Function at 0x402826
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 0x402ac8
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 0x402ac8
cmp byte [ebp - 0x47f], bl
je 0x4028e1
cmp byte [ebp - 0x47f], 2
jne 0x402ac8
cmp byte [ebp - 0x47f], 2
jne 0x402a15
push 0x49bc28
call sub.MSVCRT.dll_strlen
test eax, eax
pop ecx
jbe 0x402a15
push 0x49bc28
call sub.MSVCRT.dll_strlen
mov dword [ebp - 4], eax
mov dword [esp], 0x49bd28
call sub.MSVCRT.dll_strlen
mov dword [ebp - 0xc], eax
mov dword [esp], 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 0x49bc28
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 0x49bd28
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 0x402ac8
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 0x402ac8
cmp byte [ebp - 0x47f], bl
jne 0x402ac8
push dword [ebp + 8]
call dword [sym.imp.WS2_32.dll_gethostbyname]
cmp eax, ebx
je 0x402ad4
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 0x402ac8
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 0x402ac8
cmp byte [ebp - 0x47f], bl
jne 0x402ac8
mov al, 1
jmp 0x402ad6
push dword [esi + 0xa8]
call dword [sym.imp.WS2_32.dll_closesocket]
xor al, al
pop edi
pop esi
pop ebx
leave
ret 8