Function at 0x402dac
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp socket
Initialize winsock library
Receive data
Receive data on socket
Send data
Send data on socket
Send http request
Send http request with host header

Disassembly:
push ebx
push esi
push edi
push ebp
push eax
mov eax, 0x1a
add esp, 0xfffff004
push eax
dec eax
jne 0x402db6
mov eax, dword [esp + 0x1a000]
add esp, 0xfffffe60
mov dword [esp], ecx
mov ebp, edx
mov ebx, eax
xor esi, esi
push 0x403024
lea eax, [esp + 8]
push eax
call sub.kernel32.dll_lstrcpyA
mov edx, 0x403028
xor ecx, ecx
mov eax, ebx
call fcn.0040216c
cmp eax, 5
je 0x402e07
push 0x40302c
lea eax, [esp + 8]
push eax
call sub.kernel32.dll_lstrcpyA
push ebx
lea eax, [esp + 8]
push eax
call sub.kernel32.dll_lstrcatA
mov edx, 0x403034
lea eax, [esp + 4]
mov ecx, 2
call fcn.0040216c
test eax, eax
jne 0x402e38
push 0x403034
lea eax, [esp + 8]
push eax
call sub.kernel32.dll_lstrcatA
lea eax, [esp + 4]
push eax
call sub.kernel32.dll_lstrlenA
mov edi, eax
mov edx, 0x403034
lea eax, [esp + 4]
mov ecx, 2
call fcn.0040216c
mov ebx, eax
push 0x400
lea eax, [esp + 0x408]
push eax
call sub.kernel32.dll_RtlZeroMemory
push 0x400
lea eax, [esp + 0x808]
push eax
call sub.kernel32.dll_RtlZeroMemory
mov eax, ebx
sub eax, 7
dec eax
push eax
lea eax, [esp + 0xf]
push eax
lea eax, [esp + 0x40c]
push eax
call sub.kernel32.dll_RtlMoveMemory
sub edi, ebx
inc edi
push edi
lea eax, [esp + ebx + 7]
push eax
lea eax, [esp + 0x80c]
push eax
call sub.kernel32.dll_RtlMoveMemory
push 0x403038
lea eax, [esp + 0xc08]
push eax
call sub.kernel32.dll_lstrcpyA
lea eax, [esp + 0x804]
push eax
lea eax, [esp + 0xc08]
push eax
call sub.kernel32.dll_lstrcatA
push 0x403040
lea eax, [esp + 0xc08]
push eax
call sub.kernel32.dll_lstrcatA
push 0x40304c
lea eax, [esp + 0xc08]
push eax
call sub.kernel32.dll_lstrcatA
lea eax, [esp + 0x404]
push eax
lea eax, [esp + 0xc08]
push eax
call sub.kernel32.dll_lstrcatA
push 0x403054
lea eax, [esp + 0xc08]
push eax
call sub.kernel32.dll_lstrcatA
lea eax, [esp + 0x1a004]
push eax
push 0x101
call sub.wsock32.dll_WSAStartup
push 6
push 1
push 2
call sub.wsock32.dll_socket
mov ebx, eax
push 0x10
lea eax, [esp + 0x1a198]
push eax
call sub.kernel32.dll_RtlZeroMemory
mov word [esp + 0x1a194], 2
push 0x50
call sub.wsock32.dll_htons
mov word [esp + 0x1a196], ax
lea eax, [esp + 0x404]
call fcn.00402c40
mov dword [esp + 0x1a198], eax
push 0x10
lea eax, [esp + 0x1a198]
push eax
push ebx
call sub.wsock32.dll_connect
push 0
lea eax, [esp + 0xc08]
push eax
call sub.kernel32.dll_lstrlenA
push eax
lea eax, [esp + 0xc0c]
push eax
push ebx
call sub.wsock32.dll_send
test ebp, ebp
jne 0x402fb0
cmp dword [esp], 0
je 0x40300c
push 0x19000
lea eax, [esp + 0x1008]
push eax
call sub.kernel32.dll_RtlZeroMemory
push 0
push 0x19000
lea eax, [esp + 0x100c]
push eax
push ebx
call sub.wsock32.dll_recv
test eax, eax
jle 0x40300c
mov esi, eax
test ebp, ebp
je 0x402ff0
push esi
lea eax, [esp + 0x1008]
push eax
push ebp
call sub.kernel32.dll_RtlMoveMemory
cmp dword [esp], 0
je 0x40300c
push 0
push 1
lea edx, [esp + 0x100c]
mov ecx, esi
mov eax, dword [esp + 8]
call fcn.00402864
push ebx
call sub.wsock32.dll_closesocket
call sub.wsock32.dll_WSACleanup
mov eax, esi
add esp, 0x1a1a4
pop ebp
pop edi
pop esi
pop ebx
ret