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

Disassembly:
sub esp, 0x47c
push ebx
push ebp
mov ebp, dword [sym.imp.WS2_32.dll_send]
push esi
mov esi, ecx
push edi
push 0
lea eax, [esp + 0x14]
mov ecx, dword [esi + 0xa8]
push 4
mov bl, 2
push eax
push ecx
mov dword [esp + 0x28], 3
mov dword [esp + 0x2c], 0
mov byte [esp + 0x20], 5
mov byte [esp + 0x21], bl
mov byte [esp + 0x22], 0
mov byte [esp + 0x23], bl
call ebp
mov ecx, 0x96
xor eax, eax
lea edi, [esp + 0x234]
mov edx, dword [esi + 0xa8]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x18]
lea ecx, [esp + 0x2c]
push eax
push 0
push 0
push ecx
push 0
mov dword [esp + 0x44], edx
mov dword [esp + 0x40], 1
call dword [sym.imp.WS2_32.dll_select]
test eax, eax
jg 0x4018b0
mov edx, dword [esi + 0xa8]
push edx
jmp 0x401b0d
mov ecx, dword [esi + 0xa8]
push 0
lea eax, [esp + 0x238]
push 0x258
push eax
push ecx
call dword [sym.imp.WS2_32.dll_recv]
cmp byte [esp + 0x234], 5
jne 0x401b06
mov al, byte [esp + 0x235]
test al, al
je 0x4018ef
cmp al, bl
jne 0x401b06
jmp 0x4018f7
cmp al, bl
jne 0x401a27
mov ecx, dword [0x40ab54]
push 0x40a620
call fcn.004044d0
test eax, eax
jbe 0x401a27
mov ecx, dword [0x40ab54]
push 0x40a620
call fcn.004044d0
mov ecx, dword [0x40ab54]
push 0x40a720
mov ebx, eax
call fcn.004044d0
mov dword [esp + 0x14], eax
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x130]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov edi, dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea edx, [esp + 0x132]
push 0x40a620
push edx
mov byte [esp + 0x138], 5
mov byte [esp + 0x139], bl
call edi
lea eax, [esp + 0x14]
push 4
lea ecx, [esp + ebx + 0x136]
push eax
push ecx
mov ecx, dword [0x40ab54]
call fcn.004043d0
lea edx, [esp + ebx + 0x133]
push 0x40a720
push edx
call edi
mov eax, dword [esp + 0x14]
push 0
lea edx, [esp + 0x134]
lea ecx, [eax + ebx + 3]
mov eax, dword [esi + 0xa8]
push ecx
push edx
push eax
call ebp
lea edx, [esp + 0x18]
xor eax, eax
mov ecx, 0x96
lea edi, [esp + 0x234]
push edx
push eax
rep stosd dword es:[edi], eax
mov ecx, dword [esi + 0xa8]
push eax
lea eax, [esp + 0x38]
mov dword [esp + 0x3c], ecx
push eax
push 0
mov dword [esp + 0x40], 1
call dword [sym.imp.WS2_32.dll_select]
test eax, eax
jle 0x401b06
mov eax, dword [esi + 0xa8]
push 0
lea edx, [esp + 0x238]
push 0x258
push edx
push eax
call dword [sym.imp.WS2_32.dll_recv]
cmp byte [esp + 0x234], 5
jne 0x401b06
mov al, byte [esp + 0x235]
test al, al
jne 0x401b06
mov edx, dword [esp + 0x490]
push edx
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
je 0x401b13
mov byte [esp + 0x20], 5
mov byte [esp + 0x21], 1
mov byte [esp + 0x22], 0
mov byte [esp + 0x23], 1
mov eax, dword [eax + 0xc]
mov ecx, dword [eax]
mov eax, dword [esp + 0x494]
push eax
mov edx, dword [ecx]
mov dword [esp + 0x28], edx
call dword [sym.imp.WS2_32.dll_ntohs]
mov edx, dword [esi + 0xa8]
push 0
lea ecx, [esp + 0x24]
push 0xa
push ecx
push edx
mov word [esp + 0x38], ax
call ebp
mov ecx, 0x96
xor eax, eax
lea edi, [esp + 0x234]
lea edx, [esp + 0x2c]
rep stosd dword es:[edi], eax
mov eax, dword [esi + 0xa8]
lea ecx, [esp + 0x18]
push ecx
push 0
push 0
push edx
push 0
mov dword [esp + 0x44], eax
mov dword [esp + 0x40], 1
call dword [sym.imp.WS2_32.dll_select]
test eax, eax
jg 0x401ac6
mov eax, dword [esi + 0xa8]
push eax
jmp 0x401b0d
mov edx, dword [esi + 0xa8]
push 0
lea ecx, [esp + 0x238]
push 0x258
push ecx
push edx
call dword [sym.imp.WS2_32.dll_recv]
cmp byte [esp + 0x234], 5
jne 0x401abd
mov al, byte [esp + 0x235]
test al, al
jne 0x401abd
pop edi
pop esi
pop ebp
mov al, 1
pop ebx
add esp, 0x47c
ret 8
mov ecx, dword [esi + 0xa8]
push ecx
call dword [sym.imp.WS2_32.dll_closesocket]
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0x47c
ret 8