All pastes #390293 Raw Edit

Untitled

public text v1 · immutable
·published 2007-03-11 10:18 UTC
rendered paste body
0045D3B0  /$  8B4424 08     MOV EAX,DWORD PTR SS:[ESP+8]             ;  Eax has the length
0045D3B4  |.  56            PUSH ESI                                 ;  Push down the start of the packet
0045D3B5  |.  33F6          XOR ESI,ESI
0045D3B7  |.  85C0          TEST EAX,EAX
0045D3B9  |.  7E 52         JLE SHORT MatchSer.0045D40D
0045D3BB  |.  53            PUSH EBX                                 ;  pushing down the packet length, prolly to preserve
0045D3BC  |.  55            PUSH EBP                                 ;  who the fuck knows
0045D3BD  |.  8B6C24 18     MOV EBP,DWORD PTR SS:[ESP+18]            ;  Load ebp with something
0045D3C1  |.  57            PUSH EDI
0045D3C2  |.  8B7C24 14     MOV EDI,DWORD PTR SS:[ESP+14]            ;  load edi start of packet
0045D3C6  |.  894424 18     MOV DWORD PTR SS:[ESP+18],EAX            ;  move to the stack the packet size
0045D3CA  |.  8D9B 00000000 LEA EBX,DWORD PTR DS:[EBX]               ;  pop into ebx the packet size
0045D3D0  |>  8A07          /MOV AL,BYTE PTR DS:[EDI]                ;  get a byte from the packet ( starts after 6 byte header )
0045D3D2  |.  8B1D D0845200 |MOV EBX,DWORD PTR DS:[5284D0]           ;  Whats stored here? Currently 3
0045D3D8  |.  8A15 48856700 |MOV DL,BYTE PTR DS:[678548]             ;  Whats stored here, currently 7
0045D3DE  |.  34 F0         |XOR AL,0F0                              ;  xor the byte from packet with 0f0
0045D3E0  |.  22D0          |AND DL,AL                               ;  and DL with what we got from 678548 ( was 7 ) with the xor of the firste byte of the packet
0045D3E2  |.  B9 08000000   |MOV ECX,8                               ;  move 8 into ecx
0045D3E7  |.  2BCB          |SUB ECX,EBX                             ;  subtract ebx ( we read three ), from 8
0045D3E9  |.  D2E2          |SHL DL,CL                               ;  shift dl by the subtraction
0045D3EB  |.  8ACB          |MOV CL,BL                               ;  move that result into cl
0045D3ED  |.  D2E8          |SHR AL,CL                               ;  shift al (first byte xored with 0f0) by the sub ecx, ebx line
0045D3EF  |.  0AD0          |OR DL,AL                                ;  or the subtraction line with the result of the above shift
0045D3F1  |.  32142E        |XOR DL,BYTE PTR DS:[ESI+EBP]            ;  I have no idea what the fuck this is, but its coring dl with it
0045D3F4  |.  46            |INC ESI                                 ;  increment the storage pointer
0045D3F5  |.  83FE 20       |CMP ESI,20                              ;  check if we have done thise more thenb 0x20 times
0045D3F8  |.  8817          |MOV BYTE PTR DS:[EDI],DL                ;  store the result in the packet buffer
0045D3FA  |.  7C 02         |JL SHORT MatchSer.0045D3FE
0045D3FC  |.  33F6          |XOR ESI,ESI
0045D3FE  |>  8B4424 18     |MOV EAX,DWORD PTR SS:[ESP+18]           ;  load it up with the length again
0045D402  |.  47            |INC EDI                                 ;  next char to decrypt
0045D403  |.  48            |DEC EAX                                 ;  subtract one from length
0045D404  |.  894424 18     |MOV DWORD PTR SS:[ESP+18],EAX           ;  store the length for reuse
0045D408  |.^ 75 C6         \JNZ SHORT MatchSer.0045D3D0             ;  do it all again
0045D40A  |.  5F            POP EDI
0045D40B  |.  5D            POP EBP
0045D40C  |.  5B            POP EBX
0045D40D  |>  B0 01         MOV AL,1
0045D40F  |.  5E            POP ESI
0045D410  \.  C3            RETN