Function at 0x401d53
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, 0x4a8
mov dword [ebp - 0x4a8], ecx
mov dword [ebp - 0x384], 3
mov dword [ebp - 0x380], 0
mov dword [ebp - 0x270], 0xffffffff
mov byte [ebp - 0x14], 5
mov byte [ebp - 0x13], 2
mov byte [ebp - 0x12], 0
mov byte [ebp - 0x11], 2
push 0
push 4
lea eax, [ebp - 0x14]
push eax
mov ecx, dword [ebp - 0x4a8]
mov edx, dword [ecx + 0xa8]
push edx
call dword [sym.imp.WS2_32.dll_send]
lea eax, [ebp - 0x26c]
mov dword [ebp - 0x274], eax
push 0x258
push 0
lea ecx, [ebp - 0x26c]
push ecx
call sub.MSVCRT.dll_memset
add esp, 0xc
push 0
call dword [sym.imp.KERNEL32.dll_Sleep]
push 0
call dword [sym.imp.KERNEL32.dll_Sleep]
mov dword [ebp - 0x378], 0
mov dword [ebp - 0x388], 0
jmp 0x401e02
mov edx, dword [ebp - 0x388]
add edx, 1
mov dword [ebp - 0x388], edx
mov eax, dword [ebp - 0x388]
cmp eax, dword [ebp - 0x378]
jae 0x401e2f
mov ecx, dword [ebp - 0x388]
mov edx, dword [ebp - 0x4a8]
mov eax, dword [ebp + ecx*4 - 0x374]
cmp eax, dword [edx + 0xa8]
jne 0x401e2d
jmp 0x401e2f
jmp 0x401df3
mov ecx, dword [ebp - 0x388]
cmp ecx, dword [ebp - 0x378]
jne 0x401e6e
cmp dword [ebp - 0x378], 0x40
jae 0x401e6e
mov edx, dword [ebp - 0x388]
mov eax, dword [ebp - 0x4a8]
mov ecx, dword [eax + 0xa8]
mov dword [ebp + edx*4 - 0x374], ecx
mov edx, dword [ebp - 0x378]
add edx, 1
mov dword [ebp - 0x378], edx
xor eax, eax
test eax, eax
jne 0x401de7
lea ecx, [ebp - 0x384]
push ecx
push 0
push 0
lea edx, [ebp - 0x378]
push edx
push 0
call dword [sym.imp.WS2_32.dll_select]
mov dword [ebp - 0x270], eax
push 0
call dword [sym.imp.KERNEL32.dll_Sleep]
push 0
call dword [sym.imp.KERNEL32.dll_Sleep]
cmp dword [ebp - 0x270], 0
jg 0x401ecb
mov eax, dword [ebp - 0x4a8]
mov ecx, dword [eax + 0xa8]
push ecx
call dword [sym.imp.WS2_32.dll_closesocket]
xor al, al
jmp 0x4023b6
push 0
push 0x258
lea edx, [ebp - 0x26c]
push edx
mov eax, dword [ebp - 0x4a8]
mov ecx, dword [eax + 0xa8]
push ecx
call dword [sym.imp.WS2_32.dll_recv]
mov edx, dword [ebp - 0x274]
movsx eax, byte [edx]
cmp eax, 5
jne 0x401f17
mov ecx, dword [ebp - 0x274]
movsx edx, byte [ecx + 1]
test edx, edx
je 0x401f31
mov eax, dword [ebp - 0x274]
movsx ecx, byte [eax + 1]
cmp ecx, 2
je 0x401f31
mov edx, dword [ebp - 0x4a8]
mov eax, dword [edx + 0xa8]
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
xor al, al
jmp 0x4023b6
push 0
call dword [sym.imp.KERNEL32.dll_Sleep]
push 0
call dword [sym.imp.KERNEL32.dll_Sleep]
mov ecx, dword [ebp - 0x274]
movsx edx, byte [ecx + 1]
cmp edx, 2
jne 0x4021c2
push 0x419f38
call sub.MSVCRT.dll_strlen
add esp, 4
test eax, eax
jbe 0x4021c2
push 0x419f38
call sub.MSVCRT.dll_strlen
add esp, 4
mov dword [ebp - 0x494], eax
push 0x41a038
call sub.MSVCRT.dll_strlen
add esp, 4
mov dword [ebp - 0x498], eax
push 0x102
push 0
lea eax, [ebp - 0x48c]
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
mov byte [ebp - 0x48c], 5
mov cl, byte [ebp - 0x494]
mov byte [ebp - 0x48b], cl
push 0x419f38
lea edx, [ebp - 0x48a]
push edx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push 4
lea eax, [ebp - 0x498]
push eax
mov ecx, dword [ebp - 0x494]
lea edx, [ebp + ecx - 0x48a]
push edx
call sub.MSVCRT.dll_memcpy
add esp, 0xc
push 0x41a038
mov eax, dword [ebp - 0x494]
lea ecx, [ebp + eax - 0x489]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push 0
call dword [sym.imp.KERNEL32.dll_Sleep]
push 0
call dword [sym.imp.KERNEL32.dll_Sleep]
mov edx, dword [ebp - 0x498]
mov eax, dword [ebp - 0x494]
lea ecx, [eax + edx + 3]
mov dword [ebp - 0x49c], ecx
push 0
mov edx, dword [ebp - 0x49c]
push edx
lea eax, [ebp - 0x48c]
push eax
mov ecx, dword [ebp - 0x4a8]
mov edx, dword [ecx + 0xa8]
push edx
call dword [sym.imp.WS2_32.dll_send]
lea eax, [ebp - 0x26c]
mov dword [ebp - 0x490], eax
push 0x258
push 0
lea ecx, [ebp - 0x26c]
push ecx
call sub.MSVCRT.dll_memset
add esp, 0xc
mov dword [ebp - 0x378], 0
mov dword [ebp - 0x4a0], 0
jmp 0x402092
mov edx, dword [ebp - 0x4a0]
add edx, 1
mov dword [ebp - 0x4a0], edx
mov eax, dword [ebp - 0x4a0]
cmp eax, dword [ebp - 0x378]
jae 0x4020bf
mov ecx, dword [ebp - 0x4a0]
mov edx, dword [ebp - 0x4a8]
mov eax, dword [ebp + ecx*4 - 0x374]
cmp eax, dword [edx + 0xa8]
jne 0x4020bd
jmp 0x4020bf
jmp 0x402083
mov ecx, dword [ebp - 0x4a0]
cmp ecx, dword [ebp - 0x378]
jne 0x4020fe
cmp dword [ebp - 0x378], 0x40
jae 0x4020fe
mov edx, dword [ebp - 0x4a0]
mov eax, dword [ebp - 0x4a8]
mov ecx, dword [eax + 0xa8]
mov dword [ebp + edx*4 - 0x374], ecx
mov edx, dword [ebp - 0x378]
add edx, 1
mov dword [ebp - 0x378], edx
xor eax, eax
test eax, eax
jne 0x402077
lea ecx, [ebp - 0x384]
push ecx
push 0
push 0
lea edx, [ebp - 0x378]
push edx
push 0
call dword [sym.imp.WS2_32.dll_select]
mov dword [ebp - 0x270], eax
push 0
call dword [sym.imp.KERNEL32.dll_Sleep]
push 0
call dword [sym.imp.KERNEL32.dll_Sleep]
cmp dword [ebp - 0x270], 0
jg 0x40215b
mov eax, dword [ebp - 0x4a8]
mov ecx, dword [eax + 0xa8]
push ecx
call dword [sym.imp.WS2_32.dll_closesocket]
xor al, al
jmp 0x4023b6
push 0
call dword [sym.imp.KERNEL32.dll_Sleep]
push 0
call dword [sym.imp.KERNEL32.dll_Sleep]
push 0
push 0x258
lea edx, [ebp - 0x26c]
push edx
mov eax, dword [ebp - 0x4a8]
mov ecx, dword [eax + 0xa8]
push ecx
call dword [sym.imp.WS2_32.dll_recv]
mov edx, dword [ebp - 0x490]
movsx eax, byte [edx]
cmp eax, 5
jne 0x4021a8
mov ecx, dword [ebp - 0x490]
movsx edx, byte [ecx + 1]
test edx, edx
je 0x4021c2
mov eax, dword [ebp - 0x4a8]
mov ecx, dword [eax + 0xa8]
push ecx
call dword [sym.imp.WS2_32.dll_closesocket]
xor al, al
jmp 0x4023b6
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.WS2_32.dll_gethostbyname]
mov dword [ebp - 0x37c], eax
cmp dword [ebp - 0x37c], 0
jne 0x4021e2
xor al, al
jmp 0x4023b6
mov byte [ebp - 0x10], 5
mov byte [ebp - 0xf], 1
mov byte [ebp - 0xe], 0
mov byte [ebp - 0xd], 1
mov eax, dword [ebp - 0x37c]
mov ecx, dword [eax + 0xc]
mov edx, dword [ecx]
mov eax, dword [edx]
mov dword [ebp - 0xc], eax
mov cx, word [ebp + 0xc]
push ecx
call dword [sym.imp.WS2_32.dll_ntohs]
mov word [ebp - 8], ax
push 0
call dword [sym.imp.KERNEL32.dll_Sleep]
push 0
call dword [sym.imp.KERNEL32.dll_Sleep]
push 0
push 0xa
lea edx, [ebp - 0x10]
push edx
mov eax, dword [ebp - 0x4a8]
mov ecx, dword [eax + 0xa8]
push ecx
call dword [sym.imp.WS2_32.dll_send]
lea edx, [ebp - 0x26c]
mov dword [ebp - 4], edx
push 0x258
push 0
lea eax, [ebp - 0x26c]
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
mov dword [ebp - 0x378], 0
mov dword [ebp - 0x4a4], 0
jmp 0x402280
mov ecx, dword [ebp - 0x4a4]
add ecx, 1
mov dword [ebp - 0x4a4], ecx
mov edx, dword [ebp - 0x4a4]
cmp edx, dword [ebp - 0x378]
jae 0x4022ad
mov eax, dword [ebp - 0x4a4]
mov ecx, dword [ebp - 0x4a8]
mov edx, dword [ebp + eax*4 - 0x374]
cmp edx, dword [ecx + 0xa8]
jne 0x4022ab
jmp 0x4022ad
jmp 0x402271
mov eax, dword [ebp - 0x4a4]
cmp eax, dword [ebp - 0x378]
jne 0x4022ec
cmp dword [ebp - 0x378], 0x40
jae 0x4022ec
mov ecx, dword [ebp - 0x4a4]
mov edx, dword [ebp - 0x4a8]
mov eax, dword [edx + 0xa8]
mov dword [ebp + ecx*4 - 0x374], eax
mov ecx, dword [ebp - 0x378]
add ecx, 1
mov dword [ebp - 0x378], ecx
xor edx, edx
test edx, edx
jne 0x402265
lea eax, [ebp - 0x384]
push eax
push 0
push 0
lea ecx, [ebp - 0x378]
push ecx
push 0
call dword [sym.imp.WS2_32.dll_select]
mov dword [ebp - 0x270], eax
push 0
call dword [sym.imp.KERNEL32.dll_Sleep]
push 0
call dword [sym.imp.KERNEL32.dll_Sleep]
cmp dword [ebp - 0x270], 0
jg 0x402346
mov edx, dword [ebp - 0x4a8]
mov eax, dword [edx + 0xa8]
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
xor al, al
jmp 0x4023b6
push 0
call dword [sym.imp.KERNEL32.dll_Sleep]
push 0
call dword [sym.imp.KERNEL32.dll_Sleep]
push 0
push 0x258
lea ecx, [ebp - 0x26c]
push ecx
mov edx, dword [ebp - 0x4a8]
mov eax, dword [edx + 0xa8]
push eax
call dword [sym.imp.WS2_32.dll_recv]
mov ecx, dword [ebp - 4]
movsx edx, byte [ecx]
cmp edx, 5
jne 0x40238d
mov eax, dword [ebp - 4]
movsx ecx, byte [eax + 1]
test ecx, ecx
je 0x4023a4
mov edx, dword [ebp - 0x4a8]
mov eax, dword [edx + 0xa8]
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
xor al, al
jmp 0x4023b6
push 0
call dword [sym.imp.KERNEL32.dll_Sleep]
push 0
call dword [sym.imp.KERNEL32.dll_Sleep]
mov al, 1
mov esp, ebp
pop ebp
ret 8