Function at 0x401552
Capabilities:
Get socket status
Receive data
Receive data on socket
Resolve dns
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x480
push ebx
push esi
xor ebx, ebx
push edi
push ebx
lea eax, [ebp - 8]
mov esi, ecx
push 4
push eax
mov dword [ebp - 0x14], 3
push dword [esi + 0xa8]
mov dword [ebp - 0x10], ebx
mov byte [ebp - 8], 5
mov byte [ebp - 7], 2
mov byte [ebp - 6], bl
mov byte [ebp - 5], 2
call dword [sym.imp.WS2_32.dll_send]
mov edi, 0x258
lea eax, [ebp - 0x480]
push edi
push ebx
push eax
call sub.MSVCRT.dll_memset
mov eax, dword [esi + 0xa8]
add esp, 0xc
mov dword [ebp - 0x120], eax
lea eax, [ebp - 0x14]
push eax
push ebx
lea eax, [ebp - 0x124]
push ebx
push eax
push ebx
mov dword [ebp - 0x124], 1
call dword [sym.imp.WS2_32.dll_select]
test eax, eax
jle 0x4017f2
push ebx
lea eax, [ebp - 0x480]
push edi
push eax
push dword [esi + 0xa8]
call dword [sym.imp.WS2_32.dll_recv]
cmp byte [ebp - 0x480], 5
jne 0x4017f2
cmp byte [ebp - 0x47f], bl
je 0x40160d
cmp byte [ebp - 0x47f], 2
jne 0x4017f2
cmp byte [ebp - 0x47f], 2
jne 0x40173f
push 0x418670
call dword [sym.imp.KERNEL32.dll_lstrlenA]
test eax, eax
jle 0x40173f
push 0x418670
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push 0x418770
mov dword [ebp - 4], eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov dword [ebp - 0xc], eax
push 0x102
lea eax, [ebp - 0x228]
push ebx
push eax
call sub.MSVCRT.dll_memset
mov al, byte [ebp - 4]
add esp, 0xc
mov byte [ebp - 0x227], al
lea eax, [ebp - 0x226]
push 0x418670
push eax
mov byte [ebp - 0x228], 5
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea eax, [ebp - 0xc]
push 4
push eax
mov eax, dword [ebp - 4]
lea eax, [ebp + eax - 0x226]
push eax
call sub.MSVCRT.dll_memcpy
mov eax, dword [ebp - 4]
add esp, 0xc
lea eax, [ebp + eax - 0x225]
push 0x418770
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 4]
push ebx
lea eax, [eax + ecx + 3]
push eax
lea eax, [ebp - 0x228]
push eax
push dword [esi + 0xa8]
call dword [sym.imp.WS2_32.dll_send]
push edi
lea eax, [ebp - 0x480]
push ebx
push eax
call sub.MSVCRT.dll_memset
mov eax, dword [esi + 0xa8]
add esp, 0xc
mov dword [ebp - 0x120], eax
lea eax, [ebp - 0x14]
push eax
push ebx
lea eax, [ebp - 0x124]
push ebx
push eax
push ebx
mov dword [ebp - 0x124], 1
call dword [sym.imp.WS2_32.dll_select]
test eax, eax
jle 0x4017f2
push ebx
lea eax, [ebp - 0x480]
push edi
push eax
push dword [esi + 0xa8]
call dword [sym.imp.WS2_32.dll_recv]
cmp byte [ebp - 0x480], 5
jne 0x4017f2
cmp byte [ebp - 0x47f], bl
jne 0x4017f2
push dword [ebp + 8]
call dword [sym.imp.WS2_32.dll_gethostbyname]
cmp eax, ebx
je 0x4017fe
push dword [ebp + 0xc]
mov byte [ebp - 0x20], 5
mov byte [ebp - 0x1f], 1
mov byte [ebp - 0x1e], bl
mov byte [ebp - 0x1d], 1
mov eax, dword [eax + 0xc]
mov eax, dword [eax]
mov eax, dword [eax]
mov dword [ebp - 0x1c], eax
call dword [sym.imp.WS2_32.dll_ntohs]
mov word [ebp - 0x18], ax
push ebx
lea eax, [ebp - 0x20]
push 0xa
push eax
push dword [esi + 0xa8]
call dword [sym.imp.WS2_32.dll_send]
push edi
lea eax, [ebp - 0x480]
push ebx
push eax
call sub.MSVCRT.dll_memset
mov eax, dword [esi + 0xa8]
add esp, 0xc
mov dword [ebp - 0x120], eax
lea eax, [ebp - 0x14]
push eax
push ebx
lea eax, [ebp - 0x124]
push ebx
push eax
push ebx
mov dword [ebp - 0x124], 1
call dword [sym.imp.WS2_32.dll_select]
test eax, eax
jle 0x4017f2
push ebx
lea eax, [ebp - 0x480]
push edi
push eax
push dword [esi + 0xa8]
call dword [sym.imp.WS2_32.dll_recv]
cmp byte [ebp - 0x480], 5
jne 0x4017f2
cmp byte [ebp - 0x47f], bl
jne 0x4017f2
mov al, 1
jmp 0x401800
push dword [esi + 0xa8]
call dword [sym.imp.WS2_32.dll_closesocket]
xor al, al
pop edi
pop esi
pop ebx
leave
ret 8