Function at 0x405154
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp socket
Initialize winsock library
Link many functions at runtime
Receive data
Receive data on socket
Send data
Send data on socket
Send http request

Disassembly:
push ebp
mov ebp, esp
push eax
mov eax, 3
add esp, 0xfffff004
push eax
dec eax
jne 0x40515d
mov eax, dword [ebp - 4]
add esp, 0xfffff220
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x3de4], ebx
mov dword [ebp - 0x3de0], ebx
mov dword [ebp - 0x3ddc], ebx
mov dword [ebp - 0x3dd4], ebx
mov dword [ebp - 0x3dd8], ebx
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0xc], ecx
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
call fcn.00403ac8
mov eax, dword [ebp - 8]
call fcn.00403ac8
xor eax, eax
push ebp
push 0x40558c
push dword fs:[eax]
mov dword fs:[eax], esp
xor eax, eax
mov dword [ebp - 0x10], eax
cmp dword [ebp - 4], 0
je 0x405554
mov eax, dword [ebp - 4]
call fcn.004038d8
mov edx, dword [ebp - 4]
cmp byte [edx + eax - 1], 0x2f
jne 0x4051f8
mov eax, dword [ebp - 4]
call fcn.004038d8
mov edx, eax
lea eax, [ebp - 4]
mov ecx, 1
call fcn.00403b78
lea eax, [ebp - 0x3dd8]
push eax
mov ecx, 4
mov edx, 1
mov eax, dword [ebp - 4]
call fcn.00403b38
mov eax, dword [ebp - 0x3dd8]
lea edx, [ebp - 0x3dd4]
call fcn.004050c4
mov eax, dword [ebp - 0x3dd4]
mov edx, 0x4055a8
call fcn.00403a24
jne 0x405246
lea eax, [ebp - 4]
mov ecx, 7
mov edx, 1
call fcn.00403b78
mov edx, dword [ebp - 4]
mov eax, 0x4055b8
call fcn.00403c1c
test eax, eax
jle 0x4052a0
lea eax, [ebp - 0x14]
push eax
mov edx, dword [ebp - 4]
mov eax, 0x4055b8
call fcn.00403c1c
inc eax
push eax
mov eax, dword [ebp - 4]
call fcn.004038d8
mov ecx, eax
mov eax, dword [ebp - 4]
pop edx
call fcn.00403b38
lea eax, [ebp - 4]
push eax
mov edx, dword [ebp - 4]
mov eax, 0x4055b8
call fcn.00403c1c
mov ecx, eax
dec ecx
mov edx, 1
mov eax, dword [ebp - 4]
call fcn.00403b38
jmp 0x4052a8
lea eax, [ebp - 0x14]
call fcn.00403764
mov ebx, 0x4055bc
push 0x4055c8
call sub.kernel32.dll_LoadLibraryA
mov esi, eax
push ebx
push esi
call sub.kernel32.dll_GetProcAddress
mov ebx, eax
lea eax, [ebp - 0x1b4]
push eax
mov dl, 1
mov al, 2
call fcn.004044b0
push eax
call ebx
lea eax, [ebp - 0x1b4]
push eax
mov dl, 1
mov al, 2
call fcn.004044b0
push eax
call sub.wsock32.dll_WSAStartup
push 0
push 1
push 2
call sub.wsock32.dll_socket
mov edi, eax
cmp edi, 0xffffffff
jle 0x405532
mov word [ebp - 0x1c4], 2
mov ebx, 0x4055d4
push 0x4055c8
call sub.kernel32.dll_LoadLibraryA
mov esi, eax
push ebx
push esi
call sub.kernel32.dll_GetProcAddress
mov ebx, eax
push 0x50
call ebx
mov word [ebp - 0x1c2], ax
lea edx, [ebp - 0x3ddc]
mov eax, dword [ebp - 4]
call fcn.00404e00
mov eax, dword [ebp - 0x3ddc]
call fcn.00403ad8
push eax
call sub.wsock32.dll_inet_addr
mov dword [ebp - 0x1c0], eax
push 0x10
lea eax, [ebp - 0x1c4]
push eax
push edi
call sub.wsock32.dll_connect
test eax, eax
jne 0x405532
push 0
mov eax, dword [ebp - 0x18]
call fcn.004038d8
push eax
lea eax, [ebp - 0x18]
call fcn.00403b30
push eax
push edi
call sub.wsock32.dll_send
push 0
push 0x1394
lea eax, [ebp - 0x3c81]
push eax
push edi
call sub.wsock32.dll_recv
lea eax, [ebp - 0x18]
lea edx, [ebp - 0x3c81]
mov ecx, 0x3abd
call fcn.004038c0
mov edx, dword [ebp - 0x18]
mov eax, 0x4055e4
call fcn.00403c1c
mov ecx, eax
add ecx, 0xf
lea eax, [ebp - 0x18]
mov edx, 1
call fcn.00403b78
mov edx, dword [ebp - 0x18]
mov eax, 0x4055fc
call fcn.00403c1c
push eax
mov eax, dword [ebp - 0x18]
call fcn.004038d8
mov ecx, eax
lea eax, [ebp - 0x18]
pop edx
call fcn.00403b78
mov eax, dword [ebp - 0x18]
call fcn.00404dbc
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x24], 1
mov ebx, 0x405600
push 0x405610
call sub.kernel32.dll_LoadLibraryA
mov esi, eax
push ebx
push esi
call sub.kernel32.dll_GetProcAddress
mov ebx, eax
call ebx
mov dword [ebp - 0x20], eax
mov edx, dword [ebp - 8]
lea eax, [ebp - 0x3dd0]
call fcn.004028a8
mov edx, 1
lea eax, [ebp - 0x3dd0]
call fcn.00402bc0
call fcn.004025d4
mov eax, edi
call fcn.00405100
test eax, eax
jne 0x40548b
push 0
push 0x3abd
lea eax, [ebp - 0x3c81]
push eax
push edi
call sub.wsock32.dll_recv
mov ebx, eax
add dword [ebp - 0x24], ebx
test ebx, ebx
jle 0x405482
push 0
lea edx, [ebp - 0x3c81]
mov ecx, ebx
lea eax, [ebp - 0x3dd0]
call fcn.004029cc
call fcn.004025d4
sub dword [ebp - 0x1c], ebx
cmp dword [ebp - 0x1c], 0
jne 0x405440
lea eax, [ebp - 0x3dd0]
call fcn.004029ec
call fcn.004025d4
mov ebx, 0x405600
push 0x405610
call sub.kernel32.dll_LoadLibraryA
mov esi, eax
push ebx
push esi
call sub.kernel32.dll_GetProcAddress
mov ebx, eax
push 0
push 0x3e8
call ebx
xor edx, edx
push edx
push eax
mov eax, dword [ebp - 0x20]
cdq
sub dword [esp], eax
sbb dword [esp + 4], edx
pop eax
pop edx
call fcn.00403f08
add eax, 1
adc edx, 0
push edx
push eax
mov eax, dword [ebp - 0x24]
cdq
call fcn.00403f08
mov ebx, eax
lea edx, [ebp - 0x3de0]
mov eax, dword [ebp - 0x24]
call fcn.00404ef0
mov edx, dword [ebp - 0x3de0]
mov eax, dword [ebp - 0xc]
call fcn.004037b8
lea edx, [ebp - 0x3de4]
mov eax, ebx
call fcn.00404ef0
mov edx, dword [ebp - 0x3de4]
mov eax, dword [ebp + 8]
call fcn.004037b8
cmp dword [ebp - 0x1c], 0
jg 0x40552d
mov dword [ebp - 0x10], 0xffffffff
jmp 0x405532
xor eax, eax
mov dword [ebp - 0x10], eax
push edi
call sub.wsock32.dll_closesocket
mov ebx, 0x405620
push 0x4055c8
call sub.kernel32.dll_LoadLibraryA
mov esi, eax
push ebx
push esi
call sub.kernel32.dll_GetProcAddress
mov ebx, eax
call ebx
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x405593
lea eax, [ebp - 0x3de4]
mov edx, 5
call fcn.00403788
lea eax, [ebp - 0x18]
mov edx, 2
call fcn.00403788
lea eax, [ebp - 8]
mov edx, 2
call fcn.00403788
ret