Function at 0x5282e0
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0xdc
mov eax, dword [ebp + 0xc]
mov edx, eax
mov dword [eax], 0
mov dword [eax + 4], 0
mov dword [eax + 0xc], 0
mov eax, dword [ebp + 8]
call fcn.00527750
cmp eax, 0xffffffff
je 0x5291d2
mov edx, 1
dec eax
je 0x528713
call fcn.00529e40
mov esi, dword [ebp + 0x10]
add esi, eax
mov dword [0x78e590], eax
mov dword [ebp + 0x10], esi
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x14]
mov ecx, eax
sub ecx, edx
cmp ecx, 0x5265bff
ja 0x528584
cmp ecx, 0x3e7
jbe 0x528361
sub esp, 0xc
mov ebx, dword [ebp + 8]
push ebx
call fcn.00527370
add esp, 0x10
sub esp, 0xc
push 1
mov edx, dword [ebp + 0xc]
mov eax, dword [ebp + 8]
call fcn.00527ab0
add esp, 0x10
cmp eax, 0xffffffff
je 0x5291e4
dec eax
je 0x52870e
mov ebx, dword [ebp + 8]
mov esi, dword [ebp + 8]
add ebx, 0x7c8
add esi, 0x7c0
mov dword [ebp - 0xd8], ebx
mov dword [ebp - 0xd0], esi
mov ecx, dword [ebp - 0xd8]
lea ebx, [ebp - 0x80]
mov dword [ebp - 0x80], 0x1000
mov dword [ebp - 0x7c], ecx
push 1
push ebx
mov eax, dword [ebp - 0xd0]
push eax
mov esi, dword [ebp + 8]
mov eax, dword [esi]
push eax
call fcn.0052a190
add esp, 0x10
test eax, eax
jl 0x528be0
je 0x528bfa
mov edx, dword [ebp + 8]
cmp eax, 0xb
mov dword [edx + 0x17c8], eax
jbe 0x5283a2
mov ax, word [edx + 0x7c8]
sub esp, 0xc
and eax, 0xffff
push eax
call sub.ws2_32.dll_htons
mov ebx, dword [ebp - 0xd8]
mov ecx, dword [ebp + 8]
mov word [ecx + 0x7c8], ax
mov eax, dword [ebx + 4]
push eax
call sub.ws2_32.dll_htonl
mov esi, dword [ebp + 8]
add esp, 0xc
mov dword [ebx + 4], eax
xor ebx, ebx
mov ax, word [esi + 0x7c8]
cmp ax, 0xffff
je 0x52849f
and eax, 0xffff
cmp eax, dword [esi + 0x24]
jae 0x5283a2
lea eax, [eax + eax*4]
mov edx, dword [esi + 0x20]
lea eax, [eax + eax*4]
lea ebx, [edx + eax*8]
mov eax, dword [ebx + 0x18]
test eax, eax
sete dl
cmp eax, 6
sete al
or eax, edx
test al, 1
jne 0x5283a2
mov eax, dword [ebx + 0xc]
cmp dword [esi + 0x7c0], eax
jne 0x5283a2
mov edx, dword [ebp - 0xd8]
mov eax, dword [ebx + 8]
cmp dword [edx + 8], eax
jne 0x5283a2
mov ax, word [esi + 0x7c4]
test ebx, ebx
mov word [ebx + 0x10], ax
je 0x52849f
mov eax, dword [esi + 0x17c8]
mov edi, dword [ebx + 0x34]
add edi, eax
mov dword [ebx + 0x34], edi
mov esi, dword [ebp - 0xd8]
xor ecx, ecx
mov eax, dword [ebp + 8]
mov cl, byte [esi + 3]
add eax, 0x7d4
mov dword [ebp - 0x8c], ecx
mov dword [ebp - 0x88], eax
mov esi, esi
mov ecx, dword [ebp - 0x8c]
test ecx, ecx
je 0x528701
mov eax, dword [ebp + 8]
mov edx, dword [eax + 0x17c8]
add eax, edx
lea edx, [eax + 0x7c8]
cmp edx, dword [ebp - 0x88]
jbe 0x528701
mov ecx, dword [ebp - 0x88]
mov eax, ecx
mov dword [ebp - 0xdc], ecx
add eax, 0xc
cmp eax, edx
ja 0x5283a2
sub esp, 0xc
mov esi, dword [ecx + 4]
push esi
call sub.ws2_32.dll_htonl
mov esi, dword [ebp - 0xdc]
add esp, 0xc
mov dword [esi + 4], eax
lea edx, [eax + esi]
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x17c8]
add eax, ecx
add eax, 0x7c8
cmp edx, eax
ja 0x5283a2
mov eax, dword [ebp - 0x8c]
mov dword [ebp - 0x88], edx
dec eax
test ebx, ebx
mov dword [ebp - 0x8c], eax
je 0x528720
mov eax, dword [ebp - 0xdc]
sub esp, 0xc
mov eax, dword [eax + 8]
push eax
call sub.ws2_32.dll_htonl
mov edx, dword [ebp - 0xdc]
add esp, 0xc
mov dword [edx + 8], eax
xor eax, eax
mov al, byte [edx]
cmp eax, 0xa
ja case.0x52857d.0
jmp dword [eax*4 + 0x76c98c]
sub edx, eax
cmp edx, 0x3e7
jmp 0x528350
sub esp, 0xc
mov eax, dword [esi + 0x20]
push eax
call sub.ws2_32.dll_htonl
add esp, 0xc
cmp eax, dword [ebx + 0x74]
jne 0x5289e9
sub esp, 0xc
mov eax, dword [esi + 0x24]
push eax
call sub.ws2_32.dll_htonl
add esp, 0xc
cmp eax, dword [ebx + 0x6c]
jne 0x5289e9
sub esp, 0xc
mov eax, dword [esi + 0x28]
push eax
call sub.ws2_32.dll_htonl
add esp, 0xc
cmp eax, dword [ebx + 0x70]
jne 0x5289e9
mov edx, dword [ebp - 0xdc]
sub esp, 0xc
mov ax, word [edx + 0xc]
and eax, 0xffff
push eax
call sub.ws2_32.dll_htons
mov ecx, dword [ebp - 0xdc]
mov word [ebx + 4], ax
mov ax, word [ecx + 0xe]
and eax, 0xffff
push eax
call sub.ws2_32.dll_htons
add esp, 0xc
cmp ax, 0x23f
ja 0x5292b6
mov eax, 0x240
cmp word [ebx + 0x90], ax
jbe 0x52862c
mov word [ebx + 0x90], ax
mov esi, dword [ebp - 0xdc]
sub esp, 0xc
mov eax, dword [esi + 0x10]
push eax
call sub.ws2_32.dll_htonl
add esp, 0xc
cmp eax, 0xfff
ja 0x5292a1
mov eax, 0x1000
cmp dword [ebx + 0x94], eax
jbe 0x52865f
mov dword [ebx + 0x94], eax
mov eax, dword [ebp - 0xdc]
sub esp, 0xc
mov eax, dword [eax + 0x18]
push eax
call sub.ws2_32.dll_htonl
mov edx, dword [ebp - 0xdc]
mov dword [ebx + 0x24], eax
mov edi, dword [edx + 0x1c]
push edi
call sub.ws2_32.dll_htonl
mov esi, dword [ebp + 0xc]
mov ecx, dword [ebp + 8]
mov dword [ebx + 0x28], eax
add esp, 0xc
mov dword [ecx + 0x1c], 1
mov dword [ebx + 0x18], 3
mov dword [esi], 1
mov dword [esi + 4], ebx
test ebx, ebx
je 0x5284c0
mov esi, dword [ebp - 0xdc]
test byte [esi + 2], 1
je 0x5284c0
mov eax, dword [ebx + 0x18]
cmp eax, 4
je 0x5284c0
cmp eax, 5
jne 0x5286d8
cmp byte [esi], 4
jne 0x5284c0
push eax
mov eax, dword [ebp - 0xd8]
mov edi, dword [eax + 4]
push edi
mov esi, dword [ebp - 0xdc]
push esi
push ebx
call fcn.00529c40
mov ecx, dword [ebp - 0x8c]
add esp, 0x10
test ecx, ecx
jne 0x5284ce
mov edx, dword [ebp + 0xc]
mov eax, dword [edx]
test eax, eax
je 0x5283a2
mov edx, 1
lea esp, [ebp - 0xc]
mov eax, edx
pop ebx
pop esi
pop edi
pop ebp
ret
cmp byte [esi], 2
je 0x528552
jmp 0x5283a2
mov eax, dword [ebp - 0xdc]
cmp dword [eax + 4], 0x17
jbe case.0x52857d.0
sub esp, 0xc
mov eax, dword [eax + 0xc]
push eax
call sub.ws2_32.dll_htonl
mov edx, dword [ebp - 0xdc]
mov dword [ebx + 0x74], eax
mov eax, dword [edx + 0x10]
push eax
call sub.ws2_32.dll_htonl
mov ecx, dword [ebp - 0xdc]
mov dword [ebx + 0x6c], eax
mov eax, dword [ecx + 0x14]
push eax
call sub.ws2_32.dll_htonl
add esp, 0xc
mov dword [ebx + 0x70], eax
jmp case.0x52857d.0
mov esi, dword [ebp - 0xdc]
cmp dword [esi + 4], 0x13
jbe case.0x52857d.0
sub esp, 0xc
mov eax, dword [esi + 0xc]
push eax
call sub.ws2_32.dll_htonl
mov dword [ebx + 0x24], eax
mov eax, dword [esi + 0x10]
push eax
call sub.ws2_32.dll_htonl
mov edx, dword [ebx + 0x24]
add esp, 0xc
mov dword [ebx + 0x28], eax
test edx, edx
jne 0x528ca7
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x10]
test ecx, ecx
jne 0x528cad
mov dword [ebx + 0x94], 0x8000
jmp 0x528cc1
mov eax, dword [ebp - 0xdc]
cmp dword [eax + 4], 0x20
jbe case.0x52857d.0
mov edx, eax
xor eax, eax
mov al, byte [edx + 1]
cmp eax, dword [ebx + 0x20]
jae case.0x52857d.0
cmp dword [ebx + 0x18], 3
jne case.0x52857d.0
sub esp, 0xc
mov eax, dword [edx + 0xc]
push eax
call sub.ws2_32.dll_htonl
mov ecx, dword [ebp - 0xdc]
mov dword [ebp - 0xb8], eax
mov eax, dword [ecx + 0x14]
push eax
call sub.ws2_32.dll_htonl
mov esi, dword [ebp - 0xdc]
mov dword [ebp - 0xa8], eax
mov eax, dword [esi + 0x10]
push eax
call sub.ws2_32.dll_htonl
mov dword [ebp - 0xac], eax
mov eax, dword [esi + 0x1c]
push eax
call sub.ws2_32.dll_htonl
mov dword [ebp - 0xb0], eax
mov eax, dword [esi + 0x18]
push eax
call sub.ws2_32.dll_htonl
add esp, 0xc
mov dword [ebp - 0xbc], eax
mov eax, dword [esi + 4]
mov edx, dword [ebp - 0xbc]
sub eax, 0x20
cmp dword [ebp - 0xb0], edx
mov dword [ebp - 0xb4], eax
jae case.0x52857d.0
mov ecx, dword [ebp - 0xb0]
mov esi, dword [ebp - 0xac]
add ecx, eax
cmp ecx, edx
mov dword [ebp - 0xc8], ecx
seta dl
cmp dword [ebp - 0xa8], esi
setae al
or eax, edx
test al, 1
jne case.0x52857d.0
mov eax, dword [ebp - 0xdc]
xor edx, edx
mov edi, dword [ebx + 0x1c]
mov ecx, dword [ebp - 0xb8]
mov dl, byte [eax + 1]
shl edx, 5
add edx, edi
cmp dword [edx + 8], ecx
jae case.0x52857d.0
mov eax, dword [edx + 0x14]
add edx, 0x10
cmp edx, eax
je 0x529239
cmp byte [eax + 0x10], 8
je 0x528de1
mov eax, dword [eax + 4]
jmp 0x5288c9
mov esi, dword [ebp - 0xdc]
mov edx, dword [esi + 4]
cmp edx, 0x10
jbe case.0x52857d.0
xor eax, eax
mov al, byte [esi + 1]
cmp eax, dword [ebx + 0x20]
jae case.0x52857d.0
cmp dword [ebx + 0x18], 3
jne case.0x52857d.0
push eax
lea eax, [edx - 0x10]
push 0
push eax
mov eax, esi
add eax, 0x10
push eax
call fcn.005292d0
add esp, 0x10
push 0
push eax
push esi
jmp 0x52896e
mov ecx, dword [ebp - 0xdc]
mov edx, dword [ecx + 4]
cmp edx, 0xc
jbe case.0x52857d.0
xor eax, eax
mov al, byte [ecx + 1]
cmp eax, dword [ebx + 0x20]
jae case.0x52857d.0
cmp dword [ebx + 0x18], 3
jne case.0x52857d.0
lea eax, [edx - 0xc]
push esi
push 1
push eax
mov eax, ecx
add eax, 0xc
push eax
call fcn.005292d0
add esp, 0x10
push 0
push eax
mov edx, dword [ebp - 0xdc]
push edx
push ebx
call fcn.00529c90
add esp, 0x10
jmp case.0x52857d.0
mov eax, dword [ebp - 0xdc]
cmp dword [eax + 4], 0xb
jbe case.0x52857d.0
sub esp, 0xc
push ebx
call fcn.00529600
add esp, 0x10
cmp dword [ebx + 0x18], 3
je 0x528cf7
sub esp, 0xc
push ebx
call fcn.005296d0
add esp, 0x10
jmp case.0x52857d.0
mov esi, dword [ebp - 0xdc]
cmp dword [esi + 4], 0x2b
jbe case.0x52857d.0
cmp dword [ebx + 0x18], 1
jne case.0x52857d.0
sub esp, 0xc
mov eax, dword [esi + 0x14]
push eax
call sub.ws2_32.dll_htonl
add esp, 0xc
cmp eax, dword [ebx + 0x20]
je 0x528591
mov dword [ebx + 0x18], 6
jmp case.0x52857d.0
mov ecx, dword [ebp - 0xdc]
xor edx, edx
cmp dword [ecx + 4], 0x2b
ja 0x528b60
mov ebx, edx
jmp case.0x52857d.0
mov ecx, dword [ebp - 0xdc]
cmp dword [ecx + 4], 0x13
jbe case.0x52857d.0
sub esp, 0xc
mov eax, dword [ecx + 0x10]
push eax
call sub.ws2_32.dll_htonl
mov edx, dword [0x78e590]
add esp, 0xc
mov edi, edx
sub edi, eax
cmp edi, 0x5265bff
ja case.0x52857d.0
mov dword [ebx + 0x40], edx
push eax
push eax
push edi
push ebx
call fcn.00529390
mov edx, dword [ebx + 0x8c]
mov eax, edx
mov ecx, dword [ebx + 0x88]
shr eax, 2
add esp, 0x10
sub edx, eax
cmp ecx, edi
ja 0x529142
mov eax, edi
sub eax, ecx
shr eax, 3
add ecx, eax
sub edi, ecx
mov dword [ebx + 0x88], ecx
shr edi, 2
add edx, edi
mov esi, dword [ebx + 0x7c]
mov dword [ebx + 0x8c], edx
mov dword [ebp - 0xd4], esi
cmp ecx, esi
jae 0x528a9f
mov dword [ebp - 0xd4], ecx
mov dword [ebx + 0x7c], ecx
mov edi, dword [ebx + 0x84]
cmp edx, edi
jbe 0x528ab1
mov edi, edx
mov dword [ebx + 0x84], edx
mov eax, dword [ebx + 0x68]
test eax, eax
je 0x528af1
mov esi, dword [ebx + 0x74]
mov dword [ebp - 0x90], esi
mov esi, dword [0x78e590]
mov dword [ebp - 0x94], esi
sub esi, eax
mov dword [ebp - 0x98], esi
cmp esi, 0x5265bff
jbe 0x5291f6
mov esi, dword [ebp - 0x94]
sub eax, esi
cmp eax, dword [ebp - 0x90]
jb 0x528b11
mov esi, dword [ebp - 0xd4]
mov eax, dword [0x78e590]
mov dword [ebx + 0x78], esi
mov dword [ebx + 0x80], edi
mov dword [ebx + 0x7c], ecx
mov dword [ebx + 0x84], edx
mov dword [ebx + 0x68], eax
mov eax, dword [ebp - 0xdc]
sub esp, 0xc
mov esi, dword [eax + 0xc]
push esi
call sub.ws2_32.dll_htonl
mov ecx, dword [ebp - 0xdc]
lea esi, [ebx + 0xa8]
add esp, 0xc
mov edi, dword [ebx + 0xa8]
mov dl, byte [ecx + 1]
mov dword [ebp - 0xc4], esi
cmp dword [ebp - 0xc4], edi
je 0x52913b
mov dword [ebp - 0x9c], edi
cmp dword [edi + 8], eax
je 0x528d18
mov edi, dword [edi]
jmp 0x528b41
sub esp, 0xc
mov eax, dword [ecx + 0x14]
push eax
call sub.ws2_32.dll_htonl
xor edx, edx
add esp, 0xc
mov dword [ebp - 0xa4], eax
dec eax
cmp eax, 0xfe
ja 0x528a07
mov ebx, dword [ebp + 8]
mov edi, dword [ebx + 0x20]
mov edx, dword [ebx + 0x24]
mov ecx, edi
jmp 0x528b96
add edi, 0xc8
lea eax, [edx + edx*4]
lea eax, [eax + eax*4]
lea eax, [ecx + eax*8]
cmp eax, edi
jbe 0x528eb2
mov eax, dword [edi + 0x18]
test eax, eax
je 0x528b90
mov esi, dword [ebp + 8]
mov eax, dword [esi + 0x7c0]
cmp dword [edi + 0xc], eax
jne 0x528b90
mov ax, word [esi + 0x7c4]
cmp word [edi + 0x10], ax
jne 0x528b90
mov ebx, dword [ebp - 0xd8]
mov eax, dword [ebx + 8]
cmp dword [edi + 8], eax
jne 0x528b90
xor edx, edx
mov ebx, edx
jmp case.0x52857d.0
sub esp, 0xc
push str.Error_receiving_incoming_packets
call sub.msvcrt.dll_perror
or edx, 0xffffffff
lea esp, [ebp - 0xc]
mov eax, edx
pop ebx
pop esi
pop edi
pop ebp
ret
sub esp, 0xc
push 1
mov edx, dword [ebp + 0xc]
mov eax, dword [ebp + 8]
call fcn.00527ab0
add esp, 0x10
cmp eax, 0xffffffff
je 0x5291e4
dec eax
je 0x52870e
mov edx, dword [ebp + 0xc]
mov eax, dword [ebp + 8]
call fcn.00527750
cmp eax, 0xffffffff
je 0x5291d2
dec eax
je 0x52870e
call fcn.00529e40
mov ecx, dword [ebp + 0x10]
mov edx, eax
mov dword [0x78e590], eax
sub edx, ecx
cmp edx, 0x5265bff
jbe 0x528ca0
mov dword [ebp - 0x84], 2
push edi
mov ecx, dword [ebp + 0x10]
sub ecx, eax
cmp ecx, 0x5265bff
ja 0x528c6b
mov edx, ecx
lea eax, [ebp - 0x84]
push edx
push eax
mov ebx, dword [ebp + 8]
mov esi, dword [ebx]
push esi
call fcn.0052a240
add esp, 0x10
test eax, eax
jne 0x528bed
call fcn.00529e40
mov dword [0x78e590], eax
cmp dword [ebp - 0x84], 2
je 0x528334
xor edx, edx
jmp 0x528713
mov esi, dword [ebp + 8]
mov ecx, dword [esi + 0x10]
mov eax, ecx
cmp ecx, edx
jbe 0x528cb5
mov eax, edx
shr eax, 0x10
shl eax, 0xc
mov dword [ebx + 0x94], eax
mov eax, dword [ebx + 0x94]
cmp eax, 0xfff
ja 0x528cdd
mov dword [ebx + 0x94], 0x1000
jmp case.0x52857d.0
cmp eax, 0x8000
jbe case.0x52857d.0
mov dword [ebx + 0x94], 0x8000
jmp case.0x52857d.0
mov edx, dword [ebp - 0xdc]
xor eax, eax
mov al, byte [edx + 2]
and eax, 1
cmp eax, 1
sbb eax, eax
xor eax, 0xffffffff
add eax, 6
mov dword [ebx + 0x18], eax
jmp case.0x52857d.0
cmp byte [edi + 0x25], dl
jne 0x528b5c
cmp dword [ebp - 0xc4], edi
je 0x52913b
xor eax, eax
sub esp, 0xc
mov al, byte [edi + 0x24]
mov dword [ebp - 0xa0], eax
push edi
call fcn.0052a3a0
mov edx, dword [edi + 0x50]
add esp, 0x10
test edx, edx
je 0x528d77
mov ax, word [edi + 0x20]
mov ecx, dword [ebx + 0x98]
and eax, 0xffff
sub ecx, eax
mov dword [ebx + 0x98], ecx
mov eax, dword [edx]
dec eax
mov dword [edx], eax
test eax, eax
jne 0x528d77
sub esp, 0xc
push edx
call fcn.00529320
add esp, 0x10
sub esp, 0xc
mov edi, dword [ebp - 0x9c]
push edi
call fcn.0052a470
mov edx, dword [ebx + 0xa8]
add esp, 0x10
mov ecx, dword [ebp - 0xa0]
cmp edx, dword [ebp - 0xc4]
je 0x528da8
mov eax, dword [edx + 0x10]
mov esi, dword [edx + 0x14]
add eax, esi
mov dword [ebx + 0x44], eax
mov eax, dword [ebx + 0x18]
cmp eax, 2
je 0x529179
cmp eax, 4
jne case.0x52857d.0
cmp ecx, 4
jne case.0x52857d.0
mov eax, dword [ebp + 0xc]
mov esi, dword [ebp + 8]
mov dword [eax], 2
mov dword [esi + 0x1c], 1
mov dword [eax + 4], ebx
jmp 0x5289a6
mov esi, dword [ebp - 0xb8]
cmp dword [eax + 0x1c], esi
jne 0x5288db
mov ecx, dword [eax + 0x48]
mov esi, dword [ebp - 0xbc]
mov dword [ebp - 0xcc], ecx
cmp dword [ecx + 0xc], esi
jne case.0x52857d.0
mov edx, dword [ebp - 0xac]
cmp dword [eax + 0x3c], edx
jne case.0x52857d.0
mov ecx, dword [ebp - 0xa8]
mov edx, dword [eax + 0x44]
shr ecx, 5
mov edi, 1
mov dword [ebp - 0xe0], ecx
mov cl, byte [ebp - 0xa8]
mov esi, dword [ebp - 0xe0]
shl edi, cl
test dword [edx + esi*4], edi
jne 0x528e48
mov esi, dword [eax + 0x40]
dec esi
mov dword [eax + 0x40], esi
mov eax, dword [ebp - 0xe0]
mov ecx, dword [edx + eax*4]
or ecx, edi
mov dword [edx + eax*4], ecx
mov edx, dword [ebp - 0xcc]
mov eax, dword [edx + 0xc]
cmp dword [ebp - 0xc8], eax
jbe 0x528e75
mov edx, dword [ebp - 0xb0]
sub eax, edx
mov dword [ebp - 0xb4], eax
mov ecx, dword [ebp - 0xcc]
mov edi, dword [ebp - 0xb0]
mov eax, dword [ebp - 0xdc]
mov ecx, dword [ecx + 8]
add eax, 0x20
add edi, ecx
mov dword [ebp - 0xb0], edi
push esi
mov ecx, dword [ebp - 0xb4]
push ecx
push eax
mov edx, dword [ebp - 0xb0]
push edx
call fcn.0058e948
add esp, 0x10
jmp case.0x52857d.0
mov edi, ecx
jmp 0x528ec3
mov eax, dword [edi + 0x18]
test eax, eax
je 0x528ed0
add edi, 0xc8
lea eax, [edx + edx*4]
lea eax, [eax + eax*4]
lea eax, [ecx + eax*8]
cmp eax, edi
ja 0x528eb6
lea eax, [edx + edx*4]
xor edx, edx
lea eax, [eax + eax*4]
lea eax, [ecx + eax*8]
cmp eax, edi
jbe 0x528a07
mov esi, dword [ebp - 0xd8]
mov ecx, dword [ebp + 8]
mov ebx, dword [ebp - 0xdc]
mov dword [edi + 0x18], 2
mov eax, dword [esi + 8]
sub esp, 0xc
mov dword [edi + 8], eax
mov edx, dword [ecx + 0x7c4]
mov eax, dword [ecx + 0x7c0]
mov dword [edi + 0xc], eax
mov dword [edi + 0x10], edx
mov ax, word [ebx + 0xc]
and eax, 0xffff
push eax
call sub.ws2_32.dll_htons
mov word [edi + 4], ax
mov esi, dword [ebx + 0x18]
push esi
call sub.ws2_32.dll_htonl
mov dword [edi + 0x24], eax
mov ecx, dword [ebx + 0x1c]
push ecx
call sub.ws2_32.dll_htonl
mov dword [edi + 0x28], eax
mov edx, dword [ebx + 0x20]
push edx
call sub.ws2_32.dll_htonl
mov dword [edi + 0x74], eax
mov eax, dword [ebx + 0x24]
push eax
call sub.ws2_32.dll_htonl
mov dword [edi + 0x6c], eax
mov eax, dword [ebx + 0x28]
push eax
call sub.ws2_32.dll_htonl
mov dword [edi + 0x70], eax
mov eax, dword [ebp - 0xa4]
shl eax, 5
push eax
call fcn.0052a3e0
mov esi, dword [ebp - 0xa4]
add esp, 0x10
mov edx, eax
mov ebx, eax
mov dword [edi + 0x1c], eax
mov dword [edi + 0x20], esi
jmp 0x528fc2
sub esp, 0xc
lea eax, [ebx + 0x10]
mov dword [ebx], 0
mov dword [ebx + 4], 0
mov dword [ebx + 8], 0
mov dword [ebx + 0xc], 0
push eax
call fcn.0052a370
lea eax, [ebx + 0x18]
add ebx, 0x20
mov dword [esp], eax
call fcn.0052a370
add esp, 0x10
mov edx, dword [edi + 0x1c]
mov eax, dword [ebp - 0xa4]
shl eax, 5
lea eax, [edx + eax]
cmp eax, ebx
ja 0x528f87
mov edx, dword [ebp - 0xdc]
sub esp, 0xc
mov ax, word [edx + 0xe]
and eax, 0xffff
push eax
call sub.ws2_32.dll_htons
add esp, 0xc
cmp ax, 0x23f
ja 0x5291a4
mov eax, 0x240
mov ebx, dword [ebp + 8]
mov word [edi + 0x90], ax
mov ecx, dword [ebx + 0x10]
test ecx, ecx
jne 0x52915f
mov eax, dword [edi + 0x24]
test eax, eax
jne 0x529162
mov dword [edi + 0x94], 0x8000
mov eax, dword [edi + 0x94]
cmp eax, 0xfff
ja 0x5291b8
mov dword [edi + 0x94], 0x1000
mov esi, dword [ebp + 8]
mov ebx, 0x8000
mov eax, dword [esi + 0xc]
test eax, eax
je 0x529058
mov ebx, eax
shr ebx, 0x10
shl ebx, 0xc
mov eax, dword [ebp - 0xdc]
sub esp, 0xc
mov eax, dword [eax + 0x10]
push eax
call sub.ws2_32.dll_htonl
add esp, 0xc
cmp eax, ebx
jb 0x52921d
cmp ebx, 0xfff
ja 0x529207
mov ebx, 0x1000
mov byte [ebp - 0x48], 3
mov byte [ebp - 0x47], 0xff
mov byte [ebp - 0x46], 1
mov dword [ebp - 0x44], 0x2c
mov ax, word [edi + 6]
sub esp, 0xc
and eax, 0xffff
push eax
call sub.ws2_32.dll_htons
mov word [ebp - 0x3c], ax
mov ax, word [edi + 0x90]
and eax, 0xffff
push eax
call sub.ws2_32.dll_htons
mov word [ebp - 0x3a], ax
push ebx
call sub.ws2_32.dll_htonl
mov dword [ebp - 0x38], eax
mov eax, dword [ebp - 0xa4]
push eax
call sub.ws2_32.dll_htonl
mov ecx, dword [ebp + 8]
mov dword [ebp - 0x34], eax
mov eax, dword [ecx + 0xc]
push eax
call sub.ws2_32.dll_htonl
mov ebx, dword [ebp + 8]
mov dword [ebp - 0x30], eax
mov esi, dword [ebx + 0x10]
push esi
call sub.ws2_32.dll_htonl
mov dword [ebp - 0x2c], eax
mov ebx, dword [edi + 0x74]
push ebx
call sub.ws2_32.dll_htonl
mov dword [ebp - 0x28], eax
mov ecx, dword [edi + 0x6c]
push ecx
call sub.ws2_32.dll_htonl
mov dword [ebp - 0x24], eax
mov edx, dword [edi + 0x70]
push edx
call sub.ws2_32.dll_htonl
mov dword [ebp - 0x20], eax
lea eax, [ebp - 0x48]
push 0
push 0
push 0
push eax
push edi
call fcn.005297f0
mov edx, edi
add esp, 0x20
mov ebx, edx
jmp case.0x52857d.0
xor ecx, ecx
jmp 0x528da8
mov eax, ecx
sub eax, edi
shr eax, 3
sub ecx, eax
mov eax, ecx
mov dword [ebx + 0x88], ecx
sub eax, edi
shr eax, 2
add edx, eax
jmp 0x528a83
mov eax, dword [edi + 0x24]
cmp eax, ecx
jbe 0x529168
mov eax, ecx
shr eax, 0x10
shl eax, 0xc
mov dword [edi + 0x94], eax
jmp 0x529026
cmp ecx, 3
jne case.0x52857d.0
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp + 8]
mov dword [ebx + 0x18], 3
mov dword [edx + 0x1c], 1
mov dword [ecx], 1
mov dword [ecx + 4], ebx
jmp case.0x52857d.0
cmp ax, 0x1000
jbe 0x528ffc
mov eax, 0x1000
jmp 0x528ffc
cmp eax, 0x8000
jbe 0x529041
mov dword [edi + 0x94], 0x8000
jmp 0x529041
sub esp, 0xc
push str.Error_dispatching_incoming_packets
call sub.msvcrt.dll_perror
jmp 0x528bed
sub esp, 0xc
push str.Error_sending_outgoing_packets
call sub.msvcrt.dll_perror
jmp 0x528bed
mov eax, dword [ebp - 0x90]
cmp dword [ebp - 0x98], eax
jmp 0x528aef
cmp ebx, 0x8000
jbe 0x529086
mov ebx, 0x8000
jmp 0x529086
mov edx, dword [ebp - 0xdc]
sub esp, 0xc
mov eax, dword [edx + 0x10]
push eax
call sub.ws2_32.dll_htonl
add esp, 0xc
mov ebx, eax
jmp 0x529075
cld
mov esi, dword [ebp - 0xdc]
lea edi, [ebp - 0x78]
mov ecx, 0xb
rep movsd dword es:[edi], dword [esi]
mov eax, dword [ebp - 0xb8]
mov edx, dword [ebp - 0xa8]
mov ecx, dword [ebp - 0xac]
mov dword [ebp - 0x6c], eax
mov esi, dword [ebp - 0xb0]
mov eax, dword [ebp - 0xbc]
mov dword [ebp - 0x64], edx
mov dword [ebp - 0x68], ecx
mov dword [ebp - 0x5c], esi
mov dword [ebp - 0x60], eax
push ecx
push 1
push eax
push 0
call fcn.005292d0
add esp, 0xc
push eax
lea eax, [ebp - 0x78]
push eax
push ebx
call fcn.00529c90
add esp, 0x10
mov edx, dword [eax + 0x48]
mov dword [ebp - 0xcc], edx
jmp 0x528e17
cmp eax, 0x8000
jbe 0x528651
mov eax, 0x8000
jmp 0x528651
cmp ax, 0x1000
jbe 0x52861c
mov eax, 0x1000
jmp 0x52861c