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

Disassembly:
sub esp, 0x498
mov eax, dword [0x41f050]
xor eax, esp
mov dword [esp + 0x494], eax
push ebx
push esi
push edi
push 0x200
lea eax, [esp + 0x2a4]
mov esi, ecx
push 0
push eax
mov dword [esp + 0x1c], esi
call fcn.0040c6c0
mov ebx, dword [0x421964]
add esp, 0xc
test ebx, ebx
mov dword [esp + 0xc], 0
je 0x405cfd
push ebp
jmp 0x405a00
cmp dword [ebx + 0x1c], 0xffffffff
je 0x405ce9
movzx ecx, word [ebx + 0x4262]
push ecx
call sub.WSOCK32.dll_ntohs
movzx edx, ax
mov eax, dword [ebx + 0x4264]
push edx
push eax
call sub.WSOCK32.dll_inet_ntoa
push eax
lea ecx, [esp + 0xac]
push str._s:_d
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
mov edi, dword [sym.imp.USER32.dll_SendMessageA]
add esp, 0x10
lea eax, [esp + 0x68]
push eax
push 0xffffffffffffffff
push 0x100d
lea edx, [esp + 0xb0]
push esi
mov dword [esp + 0x78], 2
mov dword [esp + 0x7c], edx
call edi
mov ebp, eax
cmp ebp, 0xffffffff
jne 0x405b9c
mov ecx, dword [esp + 0x10]
xor eax, eax
lea edx, [esp + 0x40]
push edx
push eax
push 0x1007
push esi
mov dword [esp + 0x50], 0xc
mov dword [esp + 0x5c], eax
mov dword [esp + 0x60], eax
mov dword [esp + 0x54], ecx
mov dword [esp + 0x70], ebx
mov dword [esp + 0x58], eax
call edi
lea ecx, [esp + 0x18]
push ecx
mov ebp, eax
push ebp
push 0x102e
lea eax, [esp + 0xb0]
push esi
mov dword [esp + 0x30], 0
mov dword [esp + 0x3c], eax
call edi
lea edx, [ebx + 0x4484]
push edx
call fcn.0040c646
mov esi, eax
mov ecx, 9
lea edi, [esp + 0x84]
rep movsd dword es:[edi], dword [esi]
mov eax, dword [esp + 0x84]
mov ecx, dword [esp + 0x88]
mov edx, dword [esp + 0x8c]
mov esi, dword [sym.imp.USER32.dll_wsprintfA]
push eax
push ecx
push edx
lea eax, [esp + 0xb4]
push str._02d:_02d:_02d
push eax
call esi
mov edi, dword [esp + 0x2c]
add esp, 0x18
lea edx, [esp + 0x18]
push edx
push ebp
push 0x102e
lea ecx, [esp + 0xb0]
push edi
mov dword [esp + 0x30], 2
mov dword [esp + 0x3c], ecx
call dword [sym.imp.USER32.dll_SendMessageA]
movzx eax, word [ebx + 0x4270]
push eax
call sub.WSOCK32.dll_ntohs
cmp ax, 1
setne al
lea ecx, [ebx + 0x4272]
lea edx, [esp + 0xa4]
lea eax, [eax + eax + 0x3c]
movsx eax, al
push eax
push ecx
push eax
push str._c_s_c
push edx
call esi
add esp, 0x14
lea ecx, [esp + 0x18]
push ecx
push ebp
push 0x102e
lea eax, [esp + 0xb0]
push edi
mov dword [esp + 0x30], 1
mov dword [esp + 0x3c], eax
call dword [sym.imp.USER32.dll_SendMessageA]
mov esi, edi
mov edi, dword [sym.imp.USER32.dll_SendMessageA]
mov ecx, dword [ebx + 0x4480]
cmp ecx, 0x64
jbe 0x405bd6
mov eax, 0x51eb851f
mul ecx
mov eax, dword [ebx + 0x4478]
mov ecx, edx
xor edx, edx
shr ecx, 5
div ecx
lea edx, [esp + 0xa4]
push eax
push str._d__
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
jmp 0x405be9
push 0x419fc4
lea eax, [esp + 0xa8]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea edx, [esp + 0x18]
push edx
push ebp
push 0x102e
lea ecx, [esp + 0xb0]
push esi
mov dword [esp + 0x30], 3
mov dword [esp + 0x3c], ecx
call edi
mov eax, dword [ebx + 0x4478]
push eax
lea ecx, [esp + 0xa8]
push 0x419b78
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea eax, [esp + 0x18]
push eax
push ebp
push 0x102e
lea edx, [esp + 0xb0]
push esi
mov dword [esp + 0x30], 4
mov dword [esp + 0x3c], edx
call edi
mov ecx, dword [ebx + 0x4480]
push ecx
lea edx, [esp + 0xa8]
push 0x419b78
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
cmp dword [ebx + 0x4480], 0
mov dword [esp + 0x20], 5
jne 0x405c80
mov dword [esp + 0x2c], str.unknown
jmp 0x405c8b
lea eax, [esp + 0xa4]
mov dword [esp + 0x2c], eax
lea ecx, [esp + 0x18]
push ecx
push ebp
push 0x102e
push esi
call edi
mov edx, dword [ebx + 0x447c]
push edx
lea eax, [esp + 0xa8]
push 0x419b78
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea edx, [esp + 0x18]
push edx
push ebp
push 0x102e
lea ecx, [esp + 0xb0]
push esi
mov dword [esp + 0x30], 6
mov dword [esp + 0x3c], ecx
call edi
cmp ebp, 0x100
jae 0x405ce9
mov word [esp + ebp*2 + 0x2a4], 1
mov ebx, dword [ebx + 0x4500]
add dword [esp + 0x10], 1
test ebx, ebx
jne 0x405a00
pop ebp
mov ebx, dword [sym.imp.USER32.dll_SendMessageA]
push 0
push 0
push 0x1004
push esi
call ebx
mov edi, eax
sub edi, 1
js 0x405d39
cmp edi, 0x100
jae 0x405d34
cmp word [esp + edi*2 + 0x2a0], 0
jne 0x405d34
push 0
push edi
push 0x1008
push esi
call ebx
sub edi, 1
jns 0x405d16
mov ecx, dword [esp + 0x4a0]
mov eax, edi
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0040c6a6
add esp, 0x498
ret