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

Disassembly:
sub esp, 0x64
xor eax, eax
push ebx
mov dword [esp + 0xd], eax
xor edx, edx
mov dword [esp + 0x11], eax
push ebp
mov ebp, dword [esp + 0x70]
mov dword [esp + 0x19], eax
mov word [esp + 0x1d], ax
mov dword [esp + 0x21], edx
mov byte [esp + 0x1f], al
mov byte [esp + 0x20], al
mov al, byte [ebp + 9]
mov dword [esp + 0x25], edx
push esi
mov dword [esp + 0x2d], edx
push edi
mov esi, eax
mov word [esp + 0x35], dx
push 0x10
push esi
mov byte [esp + 0x18], 0x46
mov byte [esp + 0x19], 0x53
mov byte [esp + 0x1a], 0x52
mov byte [esp + 0x1b], 0x50
mov byte [esp + 0x1c], 0x41
mov byte [esp + 0x1d], 0x55
mov byte [esp + 0x20], 0
mov byte [esp + 0x3f], dl
call fcn.00402f80
mov ecx, dword [esp + 0x84]
mov edi, dword [sym.imp.MSVCRT.DLL_strncpy]
push eax
push ecx
call edi
mov eax, dword [ebp + 0xc]
mov ebx, dword [sym.imp.WS2_32.DLL_inet_ntoa]
add esp, 0xc
push 0x10
push eax
call ebx
lea edx, [esp + 0x1c]
push eax
push edx
call edi
mov eax, dword [ebp + 0x10]
add esp, 0xc
push 0x10
push eax
call ebx
push eax
lea eax, [esp + 0x30]
push eax
call edi
mov bl, byte [ebp]
mov ecx, 0xe
xor eax, eax
lea edi, [esp + 0x45]
mov byte [esp + 0x44], 0
and ebx, 0xf
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0x98]
add esp, 0xc
stosw word es:[edi], ax
shl ebx, 2
dec esi
mov dword [ecx], ebx
stosb byte es:[edi], al
je 0x403256
sub esi, 5
je 0x403154
sub esi, 0xb
je 0x4030d4
mov eax, dword [esp + 0x84]
mov esi, dword [sym.imp.MSVCRT.DLL_sprintf]
lea edx, [esp + 0x18]
push edx
push 0x406498
push eax
call esi
mov edx, dword [esp + 0x94]
lea ecx, [esp + 0x34]
push ecx
push 0x406498
push edx
call esi
add esp, 0x18
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x64
ret 0x18
mov ax, word [ebx + ebp]
mov edi, dword [sym.imp.WS2_32.DLL_ntohs]
push eax
call edi
mov cx, word [ebx + ebp + 2]
mov esi, eax
push ecx
call edi
mov dx, word [ebx + ebp + 4]
mov edi, eax
push edx
call dword [sym.imp.WS2_32.DLL_ntohs]
mov ebx, dword [sym.imp.MSVCRT.DLL_sprintf]
and eax, 0xffff
push eax
lea eax, [esp + 0x3c]
push 0x406490
push eax
call ebx
mov edx, dword [esp + 0x90]
and esi, 0xffff
lea ecx, [esp + 0x24]
push esi
push ecx
push 0x406488
push edx
call ebx
mov ecx, dword [esp + 0xa4]
and edi, 0xffff
lea eax, [esp + 0x44]
push edi
push eax
push 0x406488
push ecx
call ebx
add esp, 0x2c
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x64
ret 0x18
mov edi, 0x406480
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x38]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov cx, word [ebx + ebp]
mov esi, dword [sym.imp.WS2_32.DLL_ntohs]
push ecx
call esi
mov dx, word [ebx + ebp + 2]
mov edi, eax
push edx
call esi
mov dword [esp + 0x8c], eax
lea eax, [ebx + ebp + 0xd]
lea ebp, [ebx + ebp + 4]
mov ebx, dword [sym.imp.MSVCRT.DLL_sprintf]
mov byte [esp + 0x78], 1
xor esi, esi
mov dword [esp + 0x80], eax
mov edx, dword [esp + 0x80]
mov cl, byte [esp + 0x78]
test byte [edx], cl
je 0x4031da
movsx eax, byte [esp + esi + 0x10]
lea ecx, [esp + 0x38]
push eax
push ecx
lea edx, [esp + 0x40]
push 0x406478
push edx
jmp 0x4031eb
lea eax, [esp + 0x38]
push 0x2d
push eax
lea ecx, [esp + 0x40]
push 0x406478
push ecx
call ebx
mov cl, byte [esp + 0x88]
mov edx, dword [ebp]
add esp, 0x10
shl cl, 1
push edx
mov byte [esp + 0x7c], cl
call dword [sym.imp.WS2_32.DLL_ntohl]
inc esi
cmp esi, 6
jl 0x4031b4
mov ecx, dword [esp + 0x84]
and edi, 0xffff
lea eax, [esp + 0x18]
push edi
push eax
push 0x406488
push ecx
call ebx
mov eax, dword [esp + 0x9c]
lea edx, [esp + 0x38]
and eax, 0xffff
push eax
mov eax, dword [esp + 0x9c]
push edx
push 0x406488
push eax
call ebx
add esp, 0x20
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x64
ret 0x18
mov edx, dword [esp + 0x84]
mov esi, dword [sym.imp.MSVCRT.DLL_sprintf]
lea ecx, [esp + 0x18]
push ecx
push 0x406498
push edx
call esi
mov ecx, dword [esp + 0x94]
lea eax, [esp + 0x34]
push eax
push 0x406498
push ecx
call esi
xor edx, edx
xor eax, eax
mov dl, byte [ebx + ebp + 1]
mov al, byte [ebx + ebp]
push edx
push eax
lea ecx, [esp + 0x58]
push 0x406468
push ecx
call esi
add esp, 0x28
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x64
ret 0x18