Function at 0x4c1e20
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
Get socket status
Initialize winsock library
Receive data
Receive data on socket
Reference http user-agent string
Resolve dns
Resolve function by parsing pe exports
Send data
Send data on socket
Send http request
Send http request with host header

Disassembly:
push 0xffffffffffffffff
push 0x536d93
mov eax, dword fs:[0]
push eax
mov eax, 0x14b8
call fcn.00507350
mov eax, dword [0x56d940]
xor eax, esp
mov dword [esp + 0x14b0], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x56d940]
xor eax, esp
push eax
lea eax, [esp + 0x14cc]
mov dword fs:[0], eax
mov eax, dword [esp + 0x14dc]
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x14e0]
xor ebx, ebx
push eax
lea ecx, [esp + 0x2a0]
mov dword [esp + 0x14d8], ebx
call fcn.00401500
mov byte [esp + 0x14d4], 1
nop
mov edi, dword [esp + 0x14]
lea ecx, [esp + 0x29c]
push ecx
lea ebp, [edi + 0x14]
mov ecx, ebp
mov dword [esp + 0x20], ebx
mov dword [edi + 0x7c], 0xffffffff
mov dword [esp + 0x30], ebx
mov dword [esp + 0x34], ebx
call fcn.00402460
lea edx, [esp + 0x14e4]
lea esi, [edi + 0x30]
push edx
mov ecx, esi
call fcn.00402460
mov ecx, esi
call fcn.004034d0
test al, al
je 0x4c1f6c
push 0x557998
call fcn.004010d0
add esp, 4
push eax
push ebx
push 0x557998
mov ecx, ebp
call fcn.00406a70
mov esi, eax
cmp esi, 0xffffffff
je 0x4c1f6c
lea ebx, [esi + 1]
mov eax, ebp
lea ecx, [esp + 0x1e4]
call fcn.004c87f0
mov ecx, edi
push eax
add ecx, 0x30
mov byte [esp + 0x14d8], 2
call fcn.00402460
mov bl, 1
lea ecx, [esp + 0x1e4]
mov byte [esp + 0x14d4], bl
call fcn.00401540
mov eax, esi
mov edi, ebp
lea ecx, [esp + 0x1e4]
call fcn.004c87c0
push eax
mov ecx, ebp
mov byte [esp + 0x14d8], 3
call fcn.00402460
lea ecx, [esp + 0x1e4]
mov byte [esp + 0x14d4], bl
call fcn.00401540
mov edi, dword [esp + 0x14]
mov eax, dword [edi + 0xc]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x4c1f8d
mov edi, dword [esp + 0x14]
mov dword [esp + 0x1c], 1
jmp 0x4c2a7d
lea ecx, [esp + 0x1ac]
call fcn.004014d0
lea ecx, [esp + 0x1c8]
call fcn.004014d0
lea ecx, [esp + 0x200]
call fcn.004014d0
lea ecx, [esp + 0x4c]
push ecx
lea edx, [esp + 0x3c]
push edx
lea ebx, [esp + 0x208]
lea edi, [esp + 0x1d0]
lea esi, [esp + 0x1b4]
mov ecx, ebp
mov byte [esp + 0x14dc], 6
call fcn.004c1d20
cmp byte [0x57a553], 0
mov dword [esp + 0x2c8], 0xffffffff
jne 0x4c2010
lea eax, [esp + 0x2cc]
push eax
push 0x202
call sub.WS2_32.dll_WSAStartup
test eax, eax
jne 0x4c2010
mov byte [0x57a553], 1
mov edi, dword [esp + 0x14]
mov byte [esp + 0x14d4], 7
mov ecx, dword [edi + 0xc]
mov esi, dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push 0
push ecx
call esi
test eax, eax
jne 0x4c2067
lea ecx, [esp + 0x200]
mov dword [esp + 0x1c], 1
call fcn.00401540
lea ecx, [esp + 0x1c8]
call fcn.00401540
lea ecx, [esp + 0x1ac]
mov byte [esp + 0x14d4], 1
call fcn.00401540
jmp 0x4c2a7d
push 6
push 1
push 2
call sub.WS2_32.dll_socket
mov ebx, eax
mov dword [esp + 0x34], ebx
cmp ebx, 0xffffffff
jne 0x4c20c1
call sub.WS2_32.dll_WSAGetLastError
push eax
push 0x55799c
call fcn.00503827
add esp, 8
lea ecx, [esp + 0x200]
call fcn.00401540
lea ecx, [esp + 0x1c8]
call fcn.00401540
lea ecx, [esp + 0x1ac]
mov byte [esp + 0x14d4], 1
call fcn.00401540
jmp 0x4c2a5a
mov edx, dword [edi + 0xc]
push 0
push edx
call esi
test eax, eax
jne 0x4c20d7
mov dword [esp + 0x1c], 1
jmp 0x4c2090
mov ecx, ebp
lea esi, [esp + 0x264]
call fcn.004bf120
lea ecx, [esp + 0x1ac]
lea esi, [esp + 0x238]
mov byte [esp + 0x14d4], 8
call fcn.004bf120
lea ecx, [edi + 0x30]
lea esi, [esp + 0x21c]
mov byte [esp + 0x14d4], 9
call fcn.004bf120
lea ecx, [esp + 0x238]
call fcn.004014b0
push eax
call sub.WS2_32.dll_gethostbyname
mov esi, eax
test esi, esi
jne 0x4c216b
call sub.WS2_32.dll_WSAGetLastError
push eax
push str._gethostbyname_:_socket_error__d.__r_n
call fcn.00503827
add esp, 8
lea ecx, [esp + 0x21c]
call fcn.00401490
lea ecx, [esp + 0x238]
call fcn.00401490
lea ecx, [esp + 0x264]
call fcn.00401490
jmp 0x4c2090
mov eax, dword [edi + 0xc]
xor ebp, ebp
push ebp
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x4c2186
mov dword [esp + 0x1c], 1
jmp 0x4c2142
mov ecx, 2
mov word [esp + 0x254], cx
mov edx, dword [esi + 0xc]
mov eax, dword [edx]
mov ecx, dword [eax]
mov esi, dword [esp + 0x38]
xor eax, eax
push esi
mov dword [esp + 0x25c], ecx
mov dword [esp + 0x260], eax
mov dword [esp + 0x264], eax
call sub.WS2_32.dll_htons
push 0x10
lea edx, [esp + 0x258]
push edx
push ebx
mov word [esp + 0x262], ax
call sub.WS2_32.dll_connect
cmp eax, 0xffffffff
jne 0x4c2201
call sub.WS2_32.dll_WSAGetLastError
push eax
movzx eax, si
push eax
lea ecx, [esp + 0x240]
call fcn.004014b0
push eax
push str._connectAndSendData_:_connect__s:_d_error__d.__r_n
call fcn.00503827
add esp, 0x10
jmp 0x4c2142
mov ecx, dword [edi + 0xc]
mov esi, dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push ebp
push ecx
call esi
test eax, eax
jne 0x4c221f
mov dword [esp + 0x1c], 1
jmp 0x4c2142
lea ecx, [esp + 0x190]
call fcn.00406370
lea ecx, [esp + 0x21c]
mov byte [esp + 0x14d4], 0xb
call fcn.004034d0
lea ecx, [esp + 0x190]
test al, al
je 0x4c2251
push str.GET
jmp 0x4c2256
push 0x557a2c
call fcn.0042b370
push 0xffffffffffffffff
push ebp
lea edx, [esp + 0x26c]
push edx
lea ecx, [esp + 0x19c]
call fcn.0042b490
push str._HTTP_1.1_r_n
lea ecx, [esp + 0x194]
call fcn.0042b370
push str.Host:
lea ecx, [esp + 0x194]
call fcn.0042b370
push 0xffffffffffffffff
push ebp
lea eax, [esp + 0x240]
push eax
lea ecx, [esp + 0x19c]
call fcn.0042b490
push 0x557a48
lea ecx, [esp + 0x194]
call fcn.0042b370
push str.Accept:___r_n
lea ecx, [esp + 0x194]
call fcn.0042b370
push str.User_Agent:_Mozilla_5.0__Windows_NT_5.1__AppleWebKit_537.31__KHTML__like_Gecko__Chrome_26.0.1410.64_Safari_537.31_r_n
lea ecx, [esp + 0x194]
call fcn.0042b370
push str.Connection:_Keep_Alive_r_n
lea ecx, [esp + 0x194]
call fcn.0042b370
push 0x557af0
lea ecx, [esp + 0x194]
call fcn.0042b370
lea ecx, [esp + 0x21c]
call fcn.004034d0
test al, al
jne 0x4c2346
lea ecx, [esp + 0x21c]
call fcn.00402000
push eax
lea ecx, [esp + 0x460]
push str.Content_Length:__d_r_n
push ecx
call fcn.005034be
add esp, 0xc
lea edx, [esp + 0x45c]
push edx
lea ecx, [esp + 0x194]
call fcn.0042b370
push 0x557a48
lea ecx, [esp + 0x194]
call fcn.0042b370
push 0xffffffffffffffff
push ebp
lea eax, [esp + 0x224]
push eax
lea ecx, [esp + 0x19c]
call fcn.0042b490
push ebp
lea ecx, [esp + 0x194]
call fcn.00402000
push eax
lea ecx, [esp + 0x198]
call fcn.004014b0
push eax
push ebx
call sub.WS2_32.dll_send
cmp eax, 0xffffffff
jne 0x4c23b8
call sub.WS2_32.dll_WSAGetLastError
push eax
push str._connectAndSendData_:_send_error__d.__r_n
call fcn.00503827
add esp, 8
lea ecx, [esp + 0x190]
call fcn.00401490
jmp 0x4c2142
mov ecx, dword [edi + 0xc]
push ebp
push ecx
call esi
test eax, eax
jne 0x4c23dc
lea ecx, [esp + 0x190]
mov dword [esp + 0x1c], 1
call fcn.00401490
jmp 0x4c2142
lea ecx, [esp + 0x280]
call fcn.00406370
lea ecx, [edi + 0x64]
mov byte [esp + 0x14d4], 0xc
call fcn.00421cd0
lea ecx, [edi + 0x54]
call fcn.00421cd0
push 0xfff
lea edx, [esp + 0x4c9]
push ebp
push edx
mov byte [esp + 0x4d0], 0
call fcn.00506bf0
add esp, 0xc
mov dword [esp + 0x28], ebp
mov dword [esp + 0x18], 0xffffffff
mov dword [esp + 0x24], ebp
mov edi, edi
mov ebx, dword [esp + 0x34]
lea eax, [esp + 0x44]
push eax
push 0
push 0
lea ecx, [esp + 0x78]
push ecx
lea eax, [ebx + 1]
mov edi, 1
push eax
mov dword [esp + 0x58], 0xa
mov dword [esp + 0x5c], 0x3e8
mov dword [esp + 0x84], ebx
mov dword [esp + 0x80], edi
call sub.WS2_32.dll_select
test eax, eax
jle 0x4c29ee
mov ebp, dword [esp + 0x14]
mov edx, dword [ebp + 0xc]
mov esi, dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push 0
push edx
call esi
test eax, eax
je 0x4c2b0a
lea eax, [esp + 0x6c]
push eax
push ebx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x4c29ee
mov ecx, dword [ebp + 0xc]
push 0
push ecx
call esi
test eax, eax
je 0x4c2b0a
push 0x1000
lea edx, [esp + 0x4c8]
push 0
push edx
call fcn.00506bf0
add esp, 0xc
push 0
push 0x1000
lea eax, [esp + 0x4cc]
push eax
push ebx
call sub.WS2_32.dll_recv
mov edi, eax
test edi, edi
jle 0x4c29ee
mov ecx, dword [ebp + 0xc]
push 0
push ecx
call esi
test eax, eax
je 0x4c2b13
mov edx, dword [esp + 0x28]
lea esi, [edi + edx]
lea ebx, [ebp + 0x64]
push esi
mov ecx, ebx
call fcn.004215e0
push edi
lea eax, [esp + 0x4c8]
push eax
mov ecx, ebx
call fcn.004b14b0
add eax, dword [esp + 0x30]
push eax
call fcn.0050a920
mov ecx, dword [ebp + 0x10]
add esp, 0xc
mov dword [esp + 0x28], esi
test ecx, ecx
je 0x4c2545
fldz
mov edx, dword [ecx]
mov eax, dword [edx + 4]
sub esp, 8
fstp qword [esp]
push 0
push ebp
call eax
mov esi, ebp
lea ecx, [esi + 0x64]
call fcn.004b14b0
mov ecx, dword [esp + 0x28]
mov ebp, eax
lea edi, [ecx + ebp]
push str._r_n_r_n
push ebp
mov dword [esp + 0x28], edi
call fcn.00503780
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x4c2985
cmp ebx, edi
jae 0x4c2985
add ebx, 4
cmp dword [esi + 0x7c], 0xffffffff
mov dword [esp + 0x24], ebx
jne 0x4c2620
push str.HTTP_1.1
push ebp
call fcn.00503780
mov esi, eax
add esp, 8
test esi, esi
je 0x4c2620
cmp esi, edi
jae 0x4c2620
add esi, 9
push 0x557978
push esi
call fcn.00503780
add esp, 8
test eax, eax
je 0x4c2620
cmp eax, edi
jae 0x4c2620
push ecx
sub eax, esi
mov ecx, esp
mov edi, eax
call fcn.0040c820
lea ecx, [esp + 0x178]
call fcn.00401800
push 0
push 0
lea ecx, [esp + 0x17c]
call fcn.00401670
push edi
push esi
lea ecx, [esp + 0x17c]
call fcn.00401820
lea ecx, [esp + 0x174]
call fcn.004014b0
push eax
call fcn.0050381c
mov edx, dword [esp + 0x18]
add esp, 4
lea ecx, [esp + 0x174]
mov dword [edx + 0x7c], eax
call fcn.00401490
mov edi, dword [esp + 0x20]
mov eax, dword [esp + 0x14]
mov eax, dword [eax + 0x7c]
cmp eax, 0x12e
je 0x4c2639
cmp eax, 0x12d
jne 0x4c26f4
lea ecx, [esp + 0x280]
call fcn.004034d0
test al, al
je 0x4c26f4
push str.Location:
push ebp
call fcn.00503780
mov esi, eax
add esp, 8
test esi, esi
je 0x4c26f4
cmp esi, edi
jae 0x4c26f4
add esi, 0xa
push 0x557a48
push esi
call fcn.00503780
add esp, 8
test eax, eax
je 0x4c26f4
cmp eax, edi
jae 0x4c26f4
push ecx
sub eax, esi
mov ecx, esp
mov edi, eax
call fcn.0040c820
lea ecx, [esp + 0x178]
call fcn.00401800
push 0
push 0
lea ecx, [esp + 0x17c]
call fcn.00401670
push edi
push esi
lea ecx, [esp + 0x17c]
call fcn.00401820
push 0xffffffffffffffff
push 0
lea ecx, [esp + 0x17c]
push ecx
lea ecx, [esp + 0x28c]
mov byte [esp + 0x14e0], 0xd
call fcn.00401580
lea ecx, [esp + 0x174]
mov byte [esp + 0x14d4], 0xc
call fcn.00401490
mov edi, dword [esp + 0x20]
lea ecx, [esp + 0x280]
call fcn.004034d0
test al, al
je 0x4c2b20
mov ecx, dword [esp + 0x18]
cmp ecx, 0xffffffff
jne 0x4c2989
push str.Content_Length:
push ebp
call fcn.00503780
mov esi, eax
add esp, 8
test esi, esi
je 0x4c27a1
cmp esi, edi
jae 0x4c27a1
add esi, 0x10
push 0x557a48
push esi
call fcn.00503780
add esp, 8
test eax, eax
je 0x4c27a1
cmp eax, edi
jae 0x4c27a1
push ecx
sub eax, esi
mov ecx, esp
mov edi, eax
call fcn.0040c820
lea ecx, [esp + 0x178]
call fcn.00401800
push 0
push 0
lea ecx, [esp + 0x17c]
call fcn.00401670
push edi
push esi
lea ecx, [esp + 0x17c]
call fcn.00401820
lea ecx, [esp + 0x174]
call fcn.004014b0
push eax
call fcn.0050381c
add esp, 4
lea ecx, [esp + 0x174]
mov dword [esp + 0x18], eax
call fcn.00401490
mov ecx, dword [esp + 0x18]
cmp ecx, 0xffffffff
jne 0x4c2989
push 0x557a48
push ebx
call fcn.00503780
mov edi, eax
add esp, 8
test edi, edi
je 0x4c283a
cmp edi, dword [esp + 0x20]
jae 0x4c283a
push ecx
mov esi, edi
mov ecx, esp
sub esi, ebx
call fcn.0040c820
lea ecx, [esp + 0x178]
call fcn.00401800
push 0
push 0
lea ecx, [esp + 0x17c]
call fcn.00401670
push esi
push ebx
lea ecx, [esp + 0x17c]
call fcn.00401820
lea edx, [esp + 0x18]
push edx
push 0x557b98
lea ecx, [esp + 0x17c]
call fcn.004014b0
push eax
call fcn.005035e5
add esp, 0xc
cmp eax, 1
jne 0x4c282e
add dword [esp + 0x18], 7
add edi, 2
mov dword [esp + 0x24], edi
lea ecx, [esp + 0x174]
call fcn.00401490
mov ecx, dword [esp + 0x18]
cmp ecx, 0xffffffff
jne 0x4c2989
push str.Connection:
push ebp
call fcn.00503780
mov esi, eax
add esp, 8
test esi, esi
je 0x4c2985
cmp esi, dword [esp + 0x20]
jae 0x4c2985
add esi, 0xc
push 0x557a48
push esi
call fcn.00503780
add esp, 8
test eax, eax
je 0x4c2985
cmp eax, dword [esp + 0x20]
jae 0x4c2985
push ecx
sub eax, esi
mov ecx, esp
mov edi, eax
call fcn.0040c820
lea ecx, [esp + 0x178]
call fcn.00401800
push 0
push 0
lea ecx, [esp + 0x17c]
call fcn.00401670
push edi
push esi
lea ecx, [esp + 0x17c]
call fcn.00401820
lea ecx, [esp + 0x174]
mov byte [esp + 0x14d4], 0xf
call fcn.004014b0
mov ecx, eax
lea eax, [esp + 0x1e4]
call fcn.004bf0f0
push str.CLOSE
lea ecx, [esp + 0x54]
mov byte [esp + 0x14d8], 0x10
call fcn.00401500
lea ecx, [esp + 0x50]
call fcn.00402000
mov esi, eax
lea ecx, [esp + 0x1e4]
mov dword [esp + 0x3c], esi
call fcn.00402000
mov dword [esp + 0x40], eax
cmp eax, esi
lea eax, [esp + 0x3c]
jb 0x4c2925
lea eax, [esp + 0x40]
mov eax, dword [eax]
push eax
lea ecx, [esp + 0x54]
call fcn.00401560
lea ecx, [esp + 0x1e8]
mov esi, eax
call fcn.00401560
mov ecx, eax
mov eax, esi
call fcn.004c8700
add esp, 4
test eax, eax
lea ecx, [esp + 0x50]
sete bl
call fcn.00401540
test bl, bl
je 0x4c2965
mov dword [esp + 0x18], 0
lea ecx, [esp + 0x1e4]
call fcn.00401540
lea ecx, [esp + 0x174]
mov byte [esp + 0x14d4], 0xc
call fcn.00401490
mov ecx, dword [esp + 0x18]
cmp dword [esp + 0x24], 0
je 0x4c2430
test ecx, ecx
jle 0x4c2430
mov edi, dword [esp + 0x24]
mov edx, dword [esp + 0x20]
mov eax, edi
sub eax, ebp
sub edx, ebp
add eax, ecx
cmp edx, eax
jl 0x4c2430
mov eax, dword [esp + 0x14]
cmp dword [eax + 0x7c], 0xc8
jne 0x4c29c9
mov dword [esp + 0x2c], 1
lea esi, [eax + 0x54]
push ecx
mov ecx, esi
call fcn.004215e0
mov ecx, dword [esp + 0x18]
push ecx
push edi
mov ecx, esi
call fcn.004b14b0
push eax
call fcn.0050a920
add esp, 0xc
mov ebx, dword [esp + 0x34]
lea ecx, [esp + 0x280]
call fcn.00401490
lea ecx, [esp + 0x190]
call fcn.00401490
lea ecx, [esp + 0x21c]
call fcn.00401490
lea ecx, [esp + 0x238]
call fcn.00401490
lea ecx, [esp + 0x264]
call fcn.00401490
lea ecx, [esp + 0x200]
call fcn.00401540
lea ecx, [esp + 0x1c8]
call fcn.00401540
lea ecx, [esp + 0x1ac]
mov byte [esp + 0x14d4], 1
call fcn.00401540
mov edi, dword [esp + 0x14]
cmp ebx, 0xffffffff
je 0x4c2a7d
push ebx
call sub.WS2_32.dll_closesocket
cmp eax, 0xffffffff
jne 0x4c2a7d
call sub.WS2_32.dll_WSAGetLastError
push eax
push str._connectAndSendData_:_closesocket_error__d.__r_n
call fcn.00503827
add esp, 8
mov ecx, dword [edi + 0x10]
xor ebx, ebx
cmp ecx, ebx
je 0x4c2b7c
cmp dword [esp + 0x1c], ebx
jne 0x4c2b7c
cmp dword [esp + 0x30], ebx
jne 0x4c1e90
mov esi, dword [esp + 0x14]
cmp dword [esp + 0x2c], ebx
mov edx, dword [ecx]
mov edx, dword [edx]
lea eax, [esi + 0xc]
push eax
sete al
movzx eax, al
push eax
push esi
lea eax, [esp + 0x1f0]
push eax
call edx
push eax
lea ecx, [esp + 0x2a0]
mov byte [esp + 0x14d8], 0x11
call fcn.00402460
lea ecx, [esp + 0x1e4]
mov byte [esp + 0x14d4], 1
call fcn.00401540
lea ecx, [esp + 0x29c]
call fcn.004034d0
test al, al
jne 0x4c2b86
lea ecx, [esi + 0x30]
call fcn.00421e50
jmp 0x4c1e90
mov dword [esp + 0x1c], edi
jmp 0x4c29ee
mov dword [esp + 0x1c], 1
jmp 0x4c29ee
lea ecx, [esp + 0x280]
call fcn.004014b0
mov ecx, eax
lea eax, [esp + 0x1e4]
call fcn.004bf0f0
push eax
lea ecx, [esp + 0x2a0]
mov byte [esp + 0x14d8], 0xe
call fcn.00402460
lea ecx, [esp + 0x1e4]
mov byte [esp + 0x14d4], 0xc
call fcn.00401540
mov ecx, dword [esp + 0x14]
add ecx, 0x30
call fcn.00421e50
mov dword [esp + 0x30], 1
jmp 0x4c29ea
cmp dword [esp + 0x30], ebx
jne 0x4c1e90
lea ecx, [esp + 0x29c]
call fcn.00401540
lea ecx, [esp + 0x14e4]
call fcn.00401540
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x14cc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x14b0]
xor ecx, esp
call fcn.005007b7
add esp, 0x14c4
ret 0x24