Function at 0x404ab0
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
Resolve dns
Send data
Send data on socket
Send http request
Send http request with host header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x7e8
mov eax, dword [0x46e100]
mov dword [ebp - 4], eax
push esi
lea ecx, [ebp - 0x218]
call fcn.00401bb0
lea eax, [ebp - 0x1b8]
push eax
push 2
call sub.WS2_32.dll_WSAStartup
test eax, eax
je 0x404b04
mov byte [ebp - 0x785], 0
lea ecx, [ebp - 0x218]
call fcn.00401140
lea ecx, [ebp + 8]
call fcn.00401140
mov al, byte [ebp - 0x785]
jmp 0x4052a6
lea ecx, [ebp + 8]
push ecx
call fcn.004052c0
add esp, 4
lea edx, [ebp + 8]
push edx
lea eax, [ebp - 0x1f8]
push eax
call fcn.00405300
add esp, 8
lea ecx, [ebp + 8]
push ecx
call fcn.00405430
add esp, 4
mov dword [ebp - 0x1bc], eax
lea ecx, [ebp - 0x1f8]
call fcn.00401c00
push eax
call sub.WS2_32.dll_gethostbyname
mov dword [ebp - 0x2a8], eax
cmp dword [ebp - 0x2a8], 0
jne 0x404bbb
movzx edx, byte [ebp + 0x28]
test edx, edx
jne 0x404b8b
push 0x405550
lea eax, [ebp - 0x1f8]
push eax
push 0x45d2f0
push 0x46f660
call fcn.00409bf0
add esp, 8
push eax
call fcn.00409e40
add esp, 8
mov ecx, eax
call fcn.00405630
mov byte [ebp - 0x786], 0
lea ecx, [ebp - 0x1f8]
call fcn.00401140
lea ecx, [ebp - 0x218]
call fcn.00401140
lea ecx, [ebp + 8]
call fcn.00401140
mov al, byte [ebp - 0x786]
jmp 0x4052a6
push str.GET
lea ecx, [ebp - 0x218]
call fcn.004055e0
lea ecx, [ebp + 8]
push ecx
lea ecx, [ebp - 0x218]
call fcn.00403670
push str._HTTP_1.1_n
lea ecx, [ebp - 0x218]
call fcn.00402890
push str._nConnection:_close_n_n
lea edx, [ebp - 0x1f8]
push edx
push str.Host:
lea eax, [ebp - 0x7a4]
push eax
call fcn.00404030
add esp, 0xc
push eax
lea ecx, [ebp - 0x7c0]
push ecx
call fcn.004026b0
add esp, 0xc
push eax
lea ecx, [ebp - 0x218]
call fcn.00403670
lea ecx, [ebp - 0x7c0]
call fcn.00401140
lea ecx, [ebp - 0x7a4]
call fcn.00401140
push 6
push 1
push 2
call sub.WS2_32.dll_socket
mov dword [ebp - 0x1c4], eax
cmp dword [ebp - 0x1c4], 0
jae 0x404c8b
call sub.WS2_32.dll_WSACleanup
mov byte [ebp - 0x7c1], 0
lea ecx, [ebp - 0x1f8]
call fcn.00401140
lea ecx, [ebp - 0x218]
call fcn.00401140
lea ecx, [ebp + 8]
call fcn.00401140
mov al, byte [ebp - 0x7c1]
jmp 0x4052a6
push 0x10
push 0
lea edx, [ebp - 0x1d4]
push edx
call fcn.00446ca0
add esp, 0xc
mov word [ebp - 0x1d4], 2
mov eax, dword [ebp - 0x2a8]
mov ecx, dword [eax + 0xc]
mov edx, dword [ecx]
mov eax, dword [edx]
mov dword [ebp - 0x1d0], eax
mov cx, word [ebp - 0x1bc]
push ecx
call sub.WS2_32.dll_htons
mov word [ebp - 0x1d2], ax
push 0x10
lea edx, [ebp - 0x1d4]
push edx
mov eax, dword [ebp - 0x1c4]
push eax
call sub.WS2_32.dll_connect
test eax, eax
jge 0x404d52
call sub.WS2_32.dll_WSACleanup
movzx ecx, byte [ebp + 0x28]
test ecx, ecx
jne 0x404d22
push 0x405550
lea edx, [ebp - 0x1f8]
push edx
push 0x45d33c
push 0x46f660
call fcn.00409bf0
add esp, 8
push eax
call fcn.00409e40
add esp, 8
mov ecx, eax
call fcn.00405630
mov byte [ebp - 0x7c2], 0
lea ecx, [ebp - 0x1f8]
call fcn.00401140
lea ecx, [ebp - 0x218]
call fcn.00401140
lea ecx, [ebp + 8]
call fcn.00401140
mov al, byte [ebp - 0x7c2]
jmp 0x4052a6
push 0
lea ecx, [ebp - 0x218]
call fcn.00401390
push eax
lea ecx, [ebp - 0x218]
call fcn.00401c00
push eax
mov eax, dword [ebp - 0x1c4]
push eax
call sub.WS2_32.dll_send
mov esi, eax
lea ecx, [ebp - 0x218]
call fcn.00401390
cmp esi, eax
je 0x404e00
mov ecx, dword [ebp - 0x1c4]
push ecx
call sub.WS2_32.dll_closesocket
call sub.WS2_32.dll_WSACleanup
movzx edx, byte [ebp + 0x28]
test edx, edx
jne 0x404dd0
push 0x405550
lea eax, [ebp - 0x1f8]
push eax
push str.could_not_connect_to
push 0x46f660
call fcn.00409bf0
add esp, 8
push eax
call fcn.00409e40
add esp, 8
mov ecx, eax
call fcn.00405630
mov byte [ebp - 0x7c3], 0
lea ecx, [ebp - 0x1f8]
call fcn.00401140
lea ecx, [ebp - 0x218]
call fcn.00401140
lea ecx, [ebp + 8]
call fcn.00401140
mov al, byte [ebp - 0x7c3]
jmp 0x4052a6
mov dword [ebp - 0x1c0], 0x64
lea ecx, [ebp - 0x20]
call fcn.00401bb0
push 1
push 3
lea ecx, [ebp - 0x2a0]
call fcn.00405f60
cmp dword [ebp - 0x1c0], 0x64
jne 0x404e86
lea ecx, [ebp - 0x2a0]
push ecx
mov edx, dword [ebp - 0x1c4]
push edx
call fcn.00404760
add esp, 8
lea eax, [ebp - 0x20]
push eax
lea ecx, [ebp - 0x2a0]
push ecx
call fcn.0040a0e0
add esp, 8
lea edx, [ebp - 0x1c0]
push edx
lea ecx, [ebp - 0x2a0]
call fcn.00405c00
cmp dword [ebp - 0x1c0], 0x64
jne 0x404e84
lea eax, [ebp - 0x2a0]
push eax
mov ecx, dword [ebp - 0x1c4]
push ecx
call fcn.00404760
add esp, 8
jmp 0x404e21
cmp dword [ebp - 0x1c0], 0xc8
je 0x404f6a
call fcn.004055d0
push eax
push 1
lea ecx, [ebp - 0x2a0]
call fcn.00405da0
lea ecx, [ebp - 0x6c4]
call fcn.00401bb0
lea edx, [ebp - 0x6c4]
push edx
lea eax, [ebp - 0x2a0]
push eax
call fcn.0040a300
add esp, 8
movzx ecx, byte [ebp + 0x28]
test ecx, ecx
jne 0x404f1c
push 0x405550
lea edx, [ebp - 0x6c4]
push edx
push 0x45d36c
mov eax, dword [ebp - 0x1c0]
push eax
push str.Error_
push 0x46f660
call fcn.00409bf0
add esp, 8
mov ecx, eax
call fcn.00405650
push eax
call fcn.00409bf0
add esp, 8
push eax
call fcn.00409e40
add esp, 8
mov ecx, eax
call fcn.00405630
mov byte [ebp - 0x7c4], 0
lea ecx, [ebp - 0x6c4]
call fcn.00401140
lea ecx, [ebp - 0x2a0]
call fcn.004055a0
lea ecx, [ebp - 0x20]
call fcn.00401140
lea ecx, [ebp - 0x1f8]
call fcn.00401140
lea ecx, [ebp - 0x218]
call fcn.00401140
lea ecx, [ebp + 8]
call fcn.00401140
mov al, byte [ebp - 0x7c4]
jmp 0x4052a6
mov byte [ebp - 0x2a1], 0
mov dword [ebp - 0x1d8], 0xffffffff
mov dword [ebp - 0x1dc], 0xffffffff
mov ecx, 1
test ecx, ecx
je 0x4050e8
push 1
push 3
lea ecx, [ebp - 0x768]
call fcn.00405f60
lea edx, [ebp - 0x768]
push edx
mov eax, dword [ebp - 0x1c4]
push eax
call fcn.00404760
add esp, 8
push 0x45d378
lea ecx, [ebp - 0x7e4]
push ecx
lea ecx, [ebp - 0x768]
call fcn.00406020
push eax
call fcn.0040a330
add esp, 8
mov byte [ebp - 0x7c5], al
lea ecx, [ebp - 0x7e4]
call fcn.00401140
movzx edx, byte [ebp - 0x7c5]
test edx, edx
je 0x405003
lea ecx, [ebp - 0x768]
call fcn.004055a0
jmp 0x4050e8
lea ecx, [ebp - 0x6e0]
call fcn.00401bb0
lea eax, [ebp - 0x6e0]
push eax
lea ecx, [ebp - 0x768]
push ecx
call fcn.0040a0e0
add esp, 8
call fcn.004055d0
push eax
push 1
lea ecx, [ebp - 0x768]
call fcn.00405da0
push str.Content_Length:
lea edx, [ebp - 0x6e0]
push edx
call fcn.0040a330
add esp, 8
movzx eax, al
test eax, eax
je 0x405064
lea ecx, [ebp - 0x1dc]
push ecx
lea ecx, [ebp - 0x768]
call fcn.00405c00
push str.Transfer_Encoding:
lea edx, [ebp - 0x6e0]
push edx
call fcn.0040a330
add esp, 8
movzx eax, al
test eax, eax
je 0x4050cd
lea ecx, [ebp - 0x784]
call fcn.00401bb0
lea ecx, [ebp - 0x784]
push ecx
lea edx, [ebp - 0x768]
push edx
call fcn.0040a0e0
add esp, 8
push str.chunked
lea eax, [ebp - 0x784]
push eax
call fcn.0040a330
add esp, 8
movzx ecx, al
test ecx, ecx
je 0x4050c2
mov byte [ebp - 0x2a1], 1
lea ecx, [ebp - 0x784]
call fcn.00401140
lea ecx, [ebp - 0x6e0]
call fcn.00401140
lea ecx, [ebp - 0x768]
call fcn.004055a0
jmp 0x404f85
movzx edx, byte [ebp - 0x2a1]
cmp edx, 1
jne 0x40515d
movzx eax, byte [ebp + 0x28]
test eax, eax
jne 0x40511a
push 0x405550
push str.no_chunk_transfer_possible
push 0x46f660
call fcn.00409bf0
add esp, 8
mov ecx, eax
call fcn.00405630
mov byte [ebp - 0x7e5], 0
lea ecx, [ebp - 0x2a0]
call fcn.004055a0
lea ecx, [ebp - 0x20]
call fcn.00401140
lea ecx, [ebp - 0x1f8]
call fcn.00401140
lea ecx, [ebp - 0x218]
call fcn.00401140
lea ecx, [ebp + 8]
call fcn.00401140
mov al, byte [ebp - 0x7e5]
jmp 0x4052a6
mov dword [ebp - 0x1fc], 0
mov dword [ebp - 0x24], 0xffffffff
cmp dword [ebp - 0x1dc], 0xffffffff
je 0x405240
mov ecx, dword [ebp - 0x1fc]
cmp ecx, dword [ebp - 0x1dc]
jge 0x405240
push 0
push 0x400
lea edx, [ebp - 0x6a8]
push edx
mov eax, dword [ebp - 0x1c4]
push eax
call sub.WS2_32.dll_recv
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0
jg 0x405219
movzx ecx, byte [ebp + 0x28]
test ecx, ecx
jne 0x4051d6
push 0x405550
push str.Could_not_transfer_data_
push 0x46f660
call fcn.00409bf0
add esp, 8
mov ecx, eax
call fcn.00405630
mov byte [ebp - 0x7e6], 0
lea ecx, [ebp - 0x2a0]
call fcn.004055a0
lea ecx, [ebp - 0x20]
call fcn.00401140
lea ecx, [ebp - 0x1f8]
call fcn.00401140
lea ecx, [ebp - 0x218]
call fcn.00401140
lea ecx, [ebp + 8]
call fcn.00401140
mov al, byte [ebp - 0x7e6]
jmp 0x4052a6
mov edx, dword [ebp - 0x1fc]
add edx, dword [ebp - 0x24]
mov dword [ebp - 0x1fc], edx
mov eax, dword [ebp - 0x24]
push eax
lea ecx, [ebp - 0x6a8]
push ecx
mov ecx, dword [ebp + 0x24]
call fcn.00405a50
jmp 0x40517b
movzx edx, byte [ebp + 0x28]
test edx, edx
jne 0x405257
push 0x405550
mov ecx, 0x46f5c8
call fcn.00405630
mov eax, dword [ebp - 0x1c4]
push eax
call sub.WS2_32.dll_closesocket
call sub.WS2_32.dll_WSACleanup
mov byte [ebp - 0x7e7], 1
lea ecx, [ebp - 0x2a0]
call fcn.004055a0
lea ecx, [ebp - 0x20]
call fcn.00401140
lea ecx, [ebp - 0x1f8]
call fcn.00401140
lea ecx, [ebp - 0x218]
call fcn.00401140
lea ecx, [ebp + 8]
call fcn.00401140
mov al, byte [ebp - 0x7e7]
mov ecx, dword [ebp - 4]
call fcn.00446719
pop esi
mov esp, ebp
pop ebp
ret