Function at 0x528510
Capabilities:
Enumerate pe sections
Resolve function by parsing pe exports

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0xdc
mov eax, dword [esp + 0xf4]
mov ebp, dword [esp + 0xf0]
mov edx, eax
mov dword [eax], 0
mov dword [eax + 4], 0
mov dword [eax + 0xc], 0
mov eax, ebp
call fcn.00527b70
cmp eax, 0xffffffff
je 0x5287a0
dec eax
je 0x528790
call fcn.0052a0c0
mov edx, dword [esp + 0xf8]
add edx, eax
lea ecx, [ebp + 0x7c8]
mov dword [0x7381a0], eax
mov dword [esp + 0x38], edx
mov dword [esp + 0x34], ecx
mov ecx, dword [ebp + 0x14]
mov edx, eax
sub edx, ecx
cmp edx, 0x5265bff
ja 0x5287c0
cmp edx, 0x3e7
seta al
test al, al
jne 0x5287f0
mov ecx, 1
mov edx, dword [esp + 0xf4]
mov eax, ebp
call fcn.00527c90
cmp eax, 0xffffffff
je 0x5287d0
dec eax
je 0x528790
lea edx, [ebp + 0x7c0]
mov dword [esp + 0x3c], edx
lea edx, [ebp + 0x7d4]
mov dword [esp + 0x40], edx
lea edx, [ebp + 0x7e0]
mov dword [esp + 0x44], edx
mov edx, dword [esp + 0x3c]
lea esi, [esp + 0x70]
mov dword [esp + 0xc], 1
mov dword [esp + 8], esi
mov dword [esp + 4], edx
mov ecx, dword [esp + 0x34]
mov eax, dword [ebp]
mov dword [esp + 0x74], ecx
mov dword [esp], eax
mov dword [esp + 0x70], 0x1000
call fcn.0052a510
cmp eax, 0
jl 0x5287fd
je 0x5291b2
mov dword [ebp + 0x17c8], eax
cmp eax, 0xb
jbe 0x5285db
mov eax, dword [ebp + 0x7c8]
and eax, 0xffff
mov dword [esp], eax
call sub.ws2_32.dll_htons_1
push esi
mov word [ebp + 0x7c8], ax
mov eax, dword [ebp + 0x7cc]
mov dword [esp], eax
call sub.ws2_32.dll_htonl_1
push edi
mov dword [ebp + 0x7cc], eax
mov eax, dword [ebp + 0x7c8]
cmp ax, 0xffff
je 0x528810
and eax, 0xffff
cmp eax, dword [ebp + 0x24]
jae 0x5285db
lea eax, [eax + eax*4]
lea edx, [eax + eax*4]
mov eax, dword [ebp + 0x20]
lea eax, [eax + edx*8]
mov dword [esp + 0x28], eax
mov edx, eax
mov eax, dword [eax + 0x18]
cmp eax, 6
je 0x5285db
test eax, eax
je 0x5285db
mov ecx, dword [edx + 0xc]
cmp dword [ebp + 0x7c0], ecx
jne 0x5285db
mov esi, dword [edx + 8]
cmp dword [ebp + 0x7d0], esi
jne 0x5285db
mov eax, dword [ebp + 0x7c4]
mov ebx, dword [edx + 0x34]
mov word [edx + 0x10], ax
mov eax, dword [ebp + 0x17c8]
add ebx, eax
mov dword [edx + 0x34], ebx
xor edx, edx
mov ebx, dword [esp + 0x40]
mov dl, byte [ebp + 0x7cb]
mov dword [esp + 0x30], edx
test edx, edx
je 0x528778
mov eax, dword [ebp + 0x17c8]
lea eax, [ebp + eax + 0x7c8]
cmp dword [esp + 0x40], eax
jae 0x528778
mov esi, dword [esp + 0x44]
cmp eax, esi
jb 0x5285db
lea eax, [esp + 0xa4]
mov dword [esp + 0x24], eax
mov eax, dword [ebx + 4]
mov dword [esp], eax
call sub.ws2_32.dll_htonl_1
push edx
mov dword [ebx + 4], eax
add eax, ebx
mov dword [esp + 0x2c], eax
mov eax, dword [ebp + 0x17c8]
lea eax, [ebp + eax + 0x7c8]
cmp dword [esp + 0x2c], eax
ja 0x5285db
mov eax, dword [esp + 0x30]
dec eax
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x28]
test eax, eax
je 0x529100
mov eax, dword [ebx + 8]
mov dword [esp], eax
call sub.ws2_32.dll_htonl_1
push edi
mov dword [ebx + 8], eax
cmp byte [ebx], 0xa
ja case.0x528771.0
xor eax, eax
mov al, byte [ebx]
jmp dword [eax*4 + 0x718bf8]
mov ecx, dword [esp + 0xf4]
mov ecx, dword [ecx]
test ecx, ecx
je 0x5285db
lea esi, [esi]
mov eax, 1
add esp, 0xdc
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp], 0x718b90
call sub.msvcrt.dll_perror
add esp, 0xdc
or eax, 0xffffffff
pop ebx
pop esi
pop edi
pop ebp
ret
sub ecx, eax
cmp ecx, 0x3e7
seta al
jmp 0x528592
mov dword [esp], str.Error_sending_outgoing_packets
call sub.msvcrt.dll_perror
add esp, 0xdc
or eax, 0xffffffff
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp], ebp
call fcn.00527550
jmp 0x52859a
mov dword [esp], str.Error_receiving_incoming_packets
call sub.msvcrt.dll_perror
or eax, 0xffffffff
jmp 0x528795
mov dword [esp + 0x28], 0
jmp 0x5286d2
mov esi, dword [esp + 0x28]
mov eax, dword [esp + 0x28]
mov esi, dword [esi + 0x18]
test esi, esi
je 0x528848
lea esi, [esi]
add eax, 0xc8
cmp eax, edx
jae 0x5290b6
mov ecx, dword [eax + 0x18]
test ecx, ecx
jne 0x528830
mov dword [esp + 0x28], eax
mov edx, dword [esp + 0x28]
mov esi, dword [ebp + 0x7c0]
mov edi, dword [ebp + 0x7c4]
mov eax, dword [ebp + 0x7d0]
mov dword [edx + 0x18], 2
mov dword [edx + 0xc], esi
mov dword [edx + 0x10], edi
mov dword [edx + 8], eax
mov eax, dword [ebx + 0xc]
and eax, 0xffff
mov dword [esp], eax
call sub.ws2_32.dll_htons_1
push edx
mov edx, dword [esp + 0x28]
mov word [edx + 4], ax
mov eax, dword [ebx + 0x18]
mov dword [esp], eax
call sub.ws2_32.dll_htonl_1
push ecx
mov edx, dword [esp + 0x28]
mov dword [edx + 0x24], eax
mov eax, dword [ebx + 0x1c]
mov dword [esp], eax
call sub.ws2_32.dll_htonl_1
push esi
mov edx, dword [esp + 0x28]
mov dword [edx + 0x28], eax
mov eax, dword [ebx + 0x20]
mov dword [esp], eax
call sub.ws2_32.dll_htonl_1
push edi
mov edx, dword [esp + 0x28]
mov dword [edx + 0x74], eax
mov eax, dword [ebx + 0x24]
mov dword [esp], eax
call sub.ws2_32.dll_htonl_1
push edx
mov edx, dword [esp + 0x28]
mov dword [edx + 0x6c], eax
mov eax, dword [ebx + 0x28]
mov dword [esp], eax
call sub.ws2_32.dll_htonl_1
push ecx
mov edx, dword [esp + 0x28]
mov esi, dword [esp + 0x48]
shl esi, 5
mov dword [edx + 0x70], eax
mov dword [esp], esi
call fcn.0052a6f0
mov edx, dword [esp + 0x28]
mov edi, eax
mov dword [edx + 0x1c], eax
mov eax, dword [esp + 0x48]
mov dword [edx + 0x20], eax
lea eax, [edi + esi]
cmp edi, eax
jae 0x528957
mov dword [esp + 0x4c], ebx
mov ebx, edi
mov edi, dword [esp + 0x28]
lea edx, [ebx + 0x10]
mov dword [ebx], 0
mov dword [ebx + 4], 0
mov dword [ebx + 8], 0
mov dword [ebx + 0xc], 0
mov dword [esp], edx
call fcn.0052a780
lea edx, [ebx + 0x18]
mov dword [esp], edx
add ebx, 0x20
call fcn.0052a780
mov edx, dword [edi + 0x1c]
add edx, esi
cmp ebx, edx
jb 0x528916
mov ebx, dword [esp + 0x4c]
mov ax, word [ebx + 0xe]
and eax, 0xffff
mov dword [esp], eax
call sub.ws2_32.dll_htons_1
cmp ax, 0x23f
push edx
mov edx, 0x240
jbe 0x528981
cmp ax, 0x1000
mov edx, eax
jbe 0x528981
mov edx, 0x1000
mov esi, dword [esp + 0x28]
mov eax, dword [ebp + 0x10]
test eax, eax
mov word [esi + 0x90], dx
jne 0x52911e
mov eax, dword [esi + 0x24]
test eax, eax
jne 0x529154
mov dword [esi + 0x94], 0x8000
mov eax, dword [ebp + 0xc]
mov esi, 0x8000
test eax, eax
je 0x5289c0
mov esi, eax
shr esi, 0x10
shl esi, 0xc
mov eax, dword [ebx + 0x10]
mov dword [esp], eax
call sub.ws2_32.dll_htonl_1
cmp eax, esi
push edi
jb 0x529282
mov edi, 0x1000
cmp esi, 0xfff
jbe 0x5289f0
mov edi, esi
cmp esi, 0x8000
jbe 0x5289f0
mov edi, 0x8000
mov edx, dword [esp + 0x28]
mov dword [esp + 0x7c], 0x2c
mov byte [esp + 0x78], 3
mov byte [esp + 0x79], 0xff
mov ax, word [edx + 6]
mov byte [esp + 0x7a], 1
and eax, 0xffff
mov dword [esp], eax
call sub.ws2_32.dll_htons
push edx
mov edx, dword [esp + 0x28]
mov word [esp + 0x84], ax
mov eax, dword [edx + 0x90]
and eax, 0xffff
mov dword [esp], eax
call sub.ws2_32.dll_htons
push ecx
mov dword [esp], edi
mov word [esp + 0x86], ax
call sub.ws2_32.dll_htonl
push esi
mov dword [esp + 0x88], eax
mov eax, dword [esp + 0x48]
mov dword [esp], eax
call sub.ws2_32.dll_htonl
push edi
mov dword [esp + 0x8c], eax
mov eax, dword [ebp + 0xc]
mov dword [esp], eax
call sub.ws2_32.dll_htonl
push edx
mov dword [esp + 0x90], eax
mov eax, dword [ebp + 0x10]
mov dword [esp], eax
call sub.ws2_32.dll_htonl
push ecx
mov edx, dword [esp + 0x28]
mov dword [esp + 0x94], eax
mov eax, dword [edx + 0x74]
mov dword [esp], eax
call sub.ws2_32.dll_htonl
push esi
mov edx, dword [esp + 0x28]
mov dword [esp + 0x98], eax
mov eax, dword [edx + 0x6c]
mov dword [esp], eax
call sub.ws2_32.dll_htonl
push edi
mov edx, dword [esp + 0x28]
mov dword [esp + 0x9c], eax
mov eax, dword [edx + 0x70]
mov dword [esp], eax
call sub.ws2_32.dll_htonl
push edx
lea ecx, [esp + 0x78]
mov edx, dword [esp + 0x28]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], ecx
mov dword [esp], edx
mov dword [esp + 0xa0], eax
call fcn.005299e0
mov eax, dword [esp + 0x28]
test eax, eax
je 0x528b40
test byte [ebx + 2], 1
je 0x528b40
mov edx, dword [esp + 0x28]
mov eax, dword [edx + 0x18]
cmp eax, 4
je 0x528b40
cmp eax, 5
je 0x529110
mov eax, dword [ebp + 0x7cc]
mov edx, dword [esp + 0x28]
mov dword [esp + 8], eax
mov dword [esp + 4], ebx
mov dword [esp], edx
call fcn.00529980
lea esi, [esi]
mov eax, dword [esp + 0x30]
test eax, eax
je 0x528778
mov eax, dword [ebp + 0x17c8]
lea eax, [ebp + eax + 0x7c8]
cmp dword [esp + 0x2c], eax
jae 0x528778
mov esi, dword [esp + 0x2c]
mov ebx, dword [esp + 0x2c]
add esi, 0xc
cmp esi, eax
jbe 0x528714
jmp 0x5285db
cmp dword [ebx + 4], 0x13
jbe case.0x528771.0
mov eax, dword [ebx + 0xc]
mov dword [esp], eax
call sub.ws2_32.dll_htonl_1
push edx
mov edx, dword [esp + 0x28]
mov dword [edx + 0x24], eax
mov eax, dword [ebx + 0x10]
mov dword [esp], eax
call sub.ws2_32.dll_htonl_1
push ecx
mov edx, dword [esp + 0x28]
mov ecx, edx
mov dword [edx + 0x28], eax
mov edx, dword [edx + 0x24]
test edx, edx
jne 0x529167
mov edi, dword [ebp + 0x10]
test edi, edi
jne 0x52926f
mov dword [ecx + 0x94], 0x8000
jmp 0x528b08
cmp dword [ebx + 4], 0x20
jbe case.0x528771.0
xor eax, eax
mov edx, dword [esp + 0x28]
mov al, byte [ebx + 1]
cmp eax, dword [edx + 0x20]
jae 0x528b08
cmp dword [edx + 0x18], 3
jne 0x528b08
mov eax, dword [ebx + 0xc]
mov dword [esp], eax
call sub.ws2_32.dll_htonl_1
push esi
mov dword [esp + 0x54], eax
mov eax, dword [ebx + 0x14]
mov dword [esp], eax
call sub.ws2_32.dll_htonl_1
push edi
mov dword [esp + 0x4c], eax
mov eax, dword [ebx + 0x10]
mov dword [esp], eax
call sub.ws2_32.dll_htonl_1
push edx
mov dword [esp + 0x50], eax
mov eax, dword [ebx + 0x1c]
mov dword [esp], eax
call sub.ws2_32.dll_htonl_1
push ecx
mov dword [esp + 0x48], eax
mov eax, dword [ebx + 0x18]
mov dword [esp], eax
call sub.ws2_32.dll_htonl_1
mov edx, eax
push esi
mov eax, dword [ebx + 4]
cmp dword [esp + 0x48], edx
jae 0x528b08
sub eax, 0x20
mov ecx, dword [esp + 0x48]
add ecx, eax
mov dword [esp + 0x58], eax
mov dword [esp + 0x5c], ecx
cmp edx, ecx
jb 0x528b08
mov eax, dword [esp + 0x50]
cmp dword [esp + 0x4c], eax
jae 0x528b08
xor ecx, ecx
mov esi, dword [esp + 0x28]
mov cl, byte [ebx + 1]
mov eax, dword [esp + 0x54]
shl ecx, 5
add ecx, dword [esi + 0x1c]
cmp eax, dword [ecx + 8]
jbe 0x528b08
mov eax, dword [ecx + 0x14]
add ecx, 0x10
cmp eax, ecx
jne 0x528cb0
jmp 0x529431
mov eax, dword [eax + 4]
cmp eax, ecx
je 0x529431
cmp byte [eax + 0x10], 8
jne 0x528ca5
mov esi, dword [esp + 0x54]
cmp esi, dword [eax + 0x1c]
jne 0x528ca5
cmp ecx, eax
je 0x529431
mov ecx, dword [eax + 0x48]
cmp edx, dword [ecx + 0xc]
jne 0x528b08
mov ecx, dword [esp + 0x50]
cmp ecx, dword [eax + 0x3c]
jne 0x528b08
mov ecx, dword [esp + 0x4c]
mov edx, dword [eax + 0x44]
shr ecx, 5
lea esi, [edx + ecx*4]
mov edx, 1
mov cl, byte [esp + 0x4c]
shl edx, cl
test dword [esi], edx
jne 0x528cff
dec dword [eax + 0x40]
or dword [esi], edx
mov eax, dword [eax + 0x48]
mov edx, dword [eax + 0xc]
cmp dword [esp + 0x5c], edx
jbe 0x528d15
sub edx, dword [esp + 0x48]
mov dword [esp + 0x58], edx
mov eax, dword [eax + 8]
lea edx, [ebx + 0x20]
add eax, dword [esp + 0x48]
mov esi, dword [esp + 0x58]
mov dword [esp + 8], esi
mov dword [esp + 4], edx
mov dword [esp], eax
call sub.msvcrt.dll_memcpy
jmp 0x528b08
mov eax, dword [ebx + 4]
cmp eax, 0x10
jbe case.0x528771.0
xor edx, edx
mov ecx, dword [esp + 0x28]
mov dl, byte [ebx + 1]
cmp edx, dword [ecx + 0x20]
jae 0x528b08
cmp dword [ecx + 0x18], 3
jne 0x528b08
sub eax, 0x10
mov dword [esp + 8], 0
mov dword [esp + 4], eax
lea eax, [ebx + 0x10]
mov dword [esp], eax
call fcn.005294c0
mov edx, dword [esp + 0x28]
mov dword [esp + 0xc], 0
mov dword [esp + 8], eax
mov dword [esp + 4], ebx
mov dword [esp], edx
call fcn.00529ef0
jmp 0x528b08
mov eax, dword [ebx + 4]
cmp eax, 0xc
jbe case.0x528771.0
xor edx, edx
mov ecx, dword [esp + 0x28]
mov dl, byte [ebx + 1]
cmp edx, dword [ecx + 0x20]
jae 0x528b08
cmp dword [ecx + 0x18], 3
jne 0x528b08
sub eax, 0xc
mov dword [esp + 8], 1
mov dword [esp + 4], eax
mov dword [esp], esi
jmp 0x528d75
cmp dword [ebx + 4], 0x13
jbe case.0x528771.0
mov eax, dword [ebx + 0x10]
mov dword [esp], eax
call sub.ws2_32.dll_htonl_1
mov edx, dword [0x7381a0]
mov esi, edx
sub esi, eax
push ecx
cmp esi, 0x5265bff
ja case.0x528771.0
mov ecx, dword [esp + 0x28]
mov dword [ecx + 0x40], edx
mov dword [esp], ecx
mov dword [esp + 4], esi
call fcn.00529630
mov eax, dword [esp + 0x28]
mov edx, dword [eax + 0x8c]
mov ecx, dword [esp + 0x28]
mov eax, edx
shr eax, 2
sub edx, eax
mov eax, dword [ecx + 0x88]
mov dword [ecx + 0x8c], edx
cmp esi, eax
jb 0x5292a4
mov ecx, esi
sub ecx, eax
shr ecx, 3
add eax, ecx
mov ecx, dword [esp + 0x28]
sub esi, eax
shr esi, 2
mov dword [ecx + 0x88], eax
add edx, esi
mov dword [ecx + 0x8c], edx
mov ecx, dword [esp + 0x28]
cmp dword [ecx + 0x7c], eax
jbe 0x528e6b
mov dword [ecx + 0x7c], eax
mov esi, dword [esp + 0x28]
cmp dword [esi + 0x84], edx
jae 0x528e7d
mov dword [esi + 0x84], edx
mov esi, dword [esp + 0x28]
mov edi, dword [0x7381a0]
mov ecx, dword [esi + 0x68]
test ecx, ecx
je 0x528ea7
mov esi, edi
sub esi, ecx
cmp esi, 0x5265bff
jbe 0x528e9e
mov esi, ecx
sub esi, edi
mov ecx, dword [esp + 0x28]
cmp dword [ecx + 0x74], esi
ja 0x528ec9
mov esi, dword [esp + 0x28]
mov ecx, dword [esi + 0x7c]
mov dword [esi + 0x68], edi
mov dword [esi + 0x78], ecx
mov ecx, dword [esi + 0x84]
mov dword [esi + 0x80], ecx
mov dword [esi + 0x7c], eax
mov dword [esi + 0x84], edx
mov eax, dword [ebx + 0xc]
mov dword [esp], eax
call sub.ws2_32.dll_htonl_1
push edx
mov ecx, dword [esp + 0x28]
mov dl, byte [ebx + 1]
mov edi, ecx
mov esi, dword [ecx + 0xa8]
add edi, 0xa8
cmp esi, edi
jne 0x528efd
jmp 0x5291a5
mov esi, dword [esi]
cmp esi, edi
je 0x5291a5
cmp eax, dword [esi + 8]
jne 0x528ef3
cmp dl, byte [esi + 0x25]
jne 0x528ef3
cmp esi, edi
je 0x5291a5
xor edx, edx
mov dl, byte [esi + 0x24]
mov dword [esp], esi
mov dword [esp + 0x48], edx
call fcn.0052a7b0
mov eax, dword [esi + 0x50]
test eax, eax
je 0x528f47
mov edx, dword [esi + 0x20]
mov ecx, dword [esp + 0x28]
and edx, 0xffff
sub dword [ecx + 0x98], edx
mov edx, dword [eax]
dec edx
mov dword [eax], edx
test edx, edx
je 0x529301
mov dword [esp], esi
call fcn.0052a770
mov edx, dword [esp + 0x28]
mov eax, dword [edx + 0xa8]
cmp eax, edi
je 0x528f6c
mov ecx, dword [eax + 0x10]
mov edx, dword [eax + 0x14]
add edx, ecx
mov ecx, dword [esp + 0x28]
mov dword [ecx + 0x44], edx
mov edx, dword [esp + 0x28]
mov eax, dword [edx + 0x18]
cmp eax, 2
je 0x5292cf
cmp eax, 4
jne 0x528b08
cmp dword [esp + 0x48], 4
jne 0x528b08
mov esi, dword [esp + 0xf4]
mov edx, dword [esp + 0x28]
mov dword [ebp + 0x1c], 1
mov dword [esi], 2
mov dword [esi + 4], edx
mov dword [esp], edx
call fcn.00529860
jmp 0x528b08
cmp dword [ebx + 4], 0x17
jbe case.0x528771.0
mov eax, dword [ebx + 0xc]
mov dword [esp], eax
call sub.ws2_32.dll_htonl_1
push edx
mov edx, dword [esp + 0x28]
mov dword [edx + 0x74], eax
mov eax, dword [ebx + 0x10]
mov dword [esp], eax
call sub.ws2_32.dll_htonl_1
push ecx
mov edx, dword [esp + 0x28]
mov dword [edx + 0x6c], eax
mov eax, dword [ebx + 0x14]
mov dword [esp], eax
call sub.ws2_32.dll_htonl_1
push esi
mov edx, dword [esp + 0x28]
mov dword [edx + 0x70], eax
jmp 0x528b08
cmp dword [ebx + 4], 0x2b
jbe case.0x528771.0
mov edx, dword [esp + 0x28]
cmp dword [edx + 0x18], 1
jne 0x528b08
mov eax, dword [ebx + 0x14]
mov dword [esp], eax
call sub.ws2_32.dll_htonl_1
push edi
mov edx, dword [esp + 0x28]
cmp eax, dword [edx + 0x20]
je 0x52930e
mov edx, dword [esp + 0x28]
mov dword [edx + 0x18], 6
jmp 0x528b08
cmp dword [ebx + 4], 0x2b
jbe 0x5290b6
mov eax, dword [ebx + 0x14]
mov dword [esp], eax
call sub.ws2_32.dll_htonl_1
push edi
mov dword [esp + 0x48], eax
dec eax
cmp eax, 0xfe
ja 0x5290b6
mov eax, dword [ebp + 0x24]
mov edx, dword [ebp + 0x20]
mov dword [esp + 0x28], edx
lea eax, [eax + eax*4]
lea eax, [eax + eax*4]
lea edx, [edx + eax*8]
cmp dword [esp + 0x28], edx
jae 0x5290b6
mov eax, dword [esp + 0x28]
jmp 0x52908d
add eax, 0xc8
cmp eax, edx
jae 0x52881d
mov esi, dword [eax + 0x18]
test esi, esi
je 0x529080
mov ecx, dword [ebp + 0x7c0]
cmp dword [eax + 0xc], ecx
jne 0x529080
mov esi, dword [ebp + 0x7c4]
cmp word [eax + 0x10], si
jne 0x529080
mov ecx, dword [ebp + 0x7d0]
cmp dword [eax + 8], ecx
jne 0x529080
mov dword [esp + 0x28], 0
jmp 0x528b40
cmp dword [ebx + 4], 0xb
jbe case.0x528771.0
mov edx, dword [esp + 0x28]
mov dword [esp], edx
call fcn.00529790
mov edx, dword [esp + 0x28]
cmp dword [edx + 0x18], 3
jne 0x529262
mov al, byte [ebx + 2]
mov edx, dword [esp + 0x28]
shl eax, 0x1f
sar eax, 0x1f
add eax, 6
mov dword [edx + 0x18], eax
jmp 0x528b08
cmp byte [ebx], 2
je 0x528755
jmp 0x5285db
cmp byte [ebx], 4
jne 0x528b40
jmp 0x528b23
mov ecx, dword [esp + 0x28]
mov edx, dword [ecx + 0x24]
cmp edx, eax
jbe 0x52912b
mov edx, eax
mov eax, edx
shr eax, 0x10
shl eax, 0xc
cmp eax, 0xfff
jbe 0x529154
mov edx, dword [esp + 0x28]
cmp eax, 0x8000
ja 0x529295
mov dword [edx + 0x94], eax
jmp 0x5289ac
mov edx, dword [esp + 0x28]
mov dword [edx + 0x94], 0x1000
jmp 0x5289ac
mov eax, dword [ebp + 0x10]
cmp eax, edx
jbe 0x529170
mov eax, edx
shr eax, 0x10
shl eax, 0xc
cmp eax, 0xfff
jbe 0x52926f
mov edx, dword [esp + 0x28]
cmp eax, 0x8000
mov dword [edx + 0x94], eax
jbe 0x528b08
mov dword [edx + 0x94], 0x8000
jmp 0x528b08
mov dword [esp + 0x48], 0
jmp 0x528f6c
mov ecx, 1
mov edx, dword [esp + 0xf4]
mov eax, ebp
call fcn.00527c90
cmp eax, 0xffffffff
je 0x5287d0
dec eax
je 0x528790
mov edx, dword [esp + 0xf4]
mov eax, ebp
call fcn.00527b70
cmp eax, 0xffffffff
je 0x5287a0
dec eax
je 0x528790
call fcn.0052a0c0
mov edi, dword [esp + 0x38]
mov edx, eax
mov dword [0x7381a0], eax
sub edx, edi
cmp edx, 0x5265bff
jbe 0x52925b
mov ecx, dword [esp + 0x38]
mov dword [esp + 0x6c], 2
sub ecx, eax
mov eax, ecx
cmp ecx, 0x5265bff
jbe 0x529227
mov eax, edx
mov dword [esp + 8], eax
lea eax, [esp + 0x6c]
mov dword [esp + 4], eax
mov eax, dword [ebp]
mov dword [esp], eax
call fcn.0052a5e0
test eax, eax
jne 0x528809
call fcn.0052a0c0
cmp dword [esp + 0x6c], 2
mov dword [0x7381a0], eax
je 0x528576
xor eax, eax
jmp 0x528795
mov dword [esp], edx
call fcn.00529860
jmp 0x528b08
mov edx, dword [esp + 0x28]
mov dword [edx + 0x94], 0x1000
jmp 0x528b08
mov eax, dword [ebx + 0x10]
mov dword [esp], eax
call sub.ws2_32.dll_htonl_1
mov esi, eax
push ecx
jmp 0x5289d4
mov dword [edx + 0x94], 0x8000
jmp 0x5289ac
mov ecx, eax
sub ecx, esi
shr ecx, 3
sub eax, ecx
mov ecx, dword [esp + 0x28]
mov dword [ecx + 0x88], eax
mov ecx, eax
sub ecx, esi
mov esi, dword [esp + 0x28]
shr ecx, 2
add edx, ecx
mov dword [esi + 0x8c], edx
jmp 0x528e5f
cmp dword [esp + 0x48], 3
jne 0x528b08
mov edx, dword [esp + 0x28]
mov ecx, dword [esp + 0xf4]
mov dword [ebp + 0x1c], 1
mov dword [edx + 0x18], 3
mov dword [ecx], 1
mov dword [ecx + 4], edx
jmp 0x528b08
mov dword [esp], eax
call fcn.00529520
jmp 0x528f47
mov eax, dword [ebx + 0x20]
mov dword [esp], eax
call sub.ws2_32.dll_htonl_1
push esi
mov edx, dword [esp + 0x28]
cmp eax, dword [edx + 0x74]
jne 0x529031
mov eax, dword [ebx + 0x24]
mov dword [esp], eax
call sub.ws2_32.dll_htonl_1
push ecx
mov edx, dword [esp + 0x28]
cmp eax, dword [edx + 0x6c]
jne 0x529031
mov eax, dword [ebx + 0x28]
mov dword [esp], eax
call sub.ws2_32.dll_htonl_1
push edx
mov edx, dword [esp + 0x28]
cmp eax, dword [edx + 0x70]
jne 0x529031
mov eax, dword [ebx + 0xc]
and eax, 0xffff
mov dword [esp], eax
call sub.ws2_32.dll_htons_1
push esi
mov edx, dword [esp + 0x28]
mov word [edx + 4], ax
mov ax, word [ebx + 0xe]
and eax, 0xffff
mov dword [esp], eax
call sub.ws2_32.dll_htons_1
mov edx, 0x240
cmp ax, 0x23f
push edi
jbe 0x52939c
cmp ax, 0x1000
mov edx, eax
jbe 0x52939c
mov edx, 0x1000
mov ecx, dword [esp + 0x28]
cmp word [ecx + 0x90], dx
jbe 0x5293b0
mov word [ecx + 0x90], dx
mov eax, dword [ebx + 0x10]
mov dword [esp], eax
call sub.ws2_32.dll_htonl_1
cmp eax, 0xfff
push ecx
jbe 0x52942a
cmp eax, 0x8000
jbe 0x5293cf
mov eax, 0x8000
mov edx, dword [esp + 0x28]
cmp dword [edx + 0x94], eax
jbe 0x5293e1
mov dword [edx + 0x94], eax
mov eax, dword [ebx + 0x18]
mov dword [esp], eax
call sub.ws2_32.dll_htonl_1
push edi
mov edx, dword [esp + 0x28]
mov dword [edx + 0x24], eax
mov eax, dword [ebx + 0x1c]
mov dword [esp], eax
call sub.ws2_32.dll_htonl_1
push edx
mov edx, dword [esp + 0x28]
mov ecx, dword [esp + 0xf4]
mov dword [edx + 0x28], eax
mov dword [ebp + 0x1c], 1
mov dword [edx + 0x18], 3
mov dword [ecx], 1
mov dword [ecx + 4], edx
jmp 0x528b08
mov eax, 0x1000
jmp 0x5293cf
mov edi, dword [esp + 0x24]
mov esi, ebx
mov ecx, 0xb
mov eax, dword [esp + 0x54]
rep movsd dword es:[edi], dword [esi]
mov dword [esp + 0xb0], eax
mov eax, dword [esp + 0x50]
mov ecx, dword [esp + 0x4c]
mov dword [esp + 0xb4], eax
mov dword [esp + 4], edx
mov eax, dword [esp + 0x48]
mov dword [esp + 8], 1
mov dword [esp], 0
mov dword [esp + 0xb8], ecx
mov dword [esp + 0xbc], edx
mov dword [esp + 0xc0], eax
call fcn.005294c0
mov edx, dword [esp + 0x50]
lea ecx, [esp + 0xa4]
mov dword [esp + 0xc], edx
mov edx, dword [esp + 0x28]
mov dword [esp + 8], eax
mov dword [esp + 4], ecx
mov dword [esp], edx
call fcn.00529ef0
jmp 0x528ce0