Function at 0x4a19c2
Capabilities:
Access peb ldr_data
Connect socket
Get number of processors
Get socket status
Initialize winsock library
Receive data
Receive data on socket
Reference http user-agent string
Resolve dns
Send data
Send data on socket
Send http request
Send http request with host header

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5162f1
mov eax, dword fs:[0]
push eax
mov eax, 0x14c4
call fcn.004e5f20
mov eax, dword [0x549950]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov esi, ecx
mov dword [ebp - 0x137c], esi
xor edi, edi
push eax
lea ecx, [ebp - 0x11bc]
mov dword [ebp - 4], edi
call fcn.004012a0
lea eax, [esi + 0x14]
mov dword [ebp - 0x1378], eax
lea eax, [esi + 0x30]
mov dword [ebp - 0x138c], eax
lea eax, [esi + 0xc]
mov byte [ebp - 4], 1
mov dword [ebp - 0x1370], eax
mov ecx, dword [ebp - 0x1378]
or dword [esi + 0x7c], 0xffffffff
push 0xffffffffffffffff
push edi
lea eax, [ebp - 0x11bc]
push eax
mov dword [ebp - 0x1368], edi
mov dword [ebp - 0x1398], edi
mov dword [ebp - 0x1394], edi
call fcn.004019d0
mov ecx, dword [ebp - 0x138c]
push 0xffffffffffffffff
push edi
lea eax, [ebp + 0xc]
push eax
call fcn.004019d0
cmp dword [esi + 0x44], edi
jne 0x4a1af5
push dword [ebp - 0x1378]
call fcn.004a2fff
mov ebx, eax
cmp ebx, 0xffffffff
je 0x4a1af5
mov ecx, dword [ebp - 0x1378]
lea eax, [ebx + 1]
push eax
lea eax, [ebp - 0x10cc]
call fcn.004a750f
pop ecx
mov ecx, dword [ebp - 0x138c]
push 0xffffffffffffffff
push edi
push eax
mov byte [ebp - 4], 2
call fcn.004019d0
lea ecx, [ebp - 0x10cc]
mov byte [ebp - 4], 1
call fcn.004012e0
push ebx
push dword [ebp - 0x1378]
lea eax, [ebp - 0x10cc]
call fcn.004a74dc
pop ecx
pop ecx
mov ecx, dword [ebp - 0x1378]
push 0xffffffffffffffff
push edi
push eax
mov byte [ebp - 4], 3
call fcn.004019d0
lea ecx, [ebp - 0x10cc]
mov byte [ebp - 4], 1
call fcn.004012e0
mov eax, dword [ebp - 0x1370]
push edi
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x4a1b17
mov dword [ebp - 0x1368], 1
jmp 0x4a2520
push 7
pop esi
push edi
lea ecx, [ebp - 0x1104]
mov dword [ebp - 0x10ec], esi
call fcn.00401830
push edi
lea ecx, [ebp - 0x1120]
mov dword [ebp - 0x1108], esi
call fcn.00401830
push edi
lea ecx, [ebp - 0x113c]
mov dword [ebp - 0x1124], esi
call fcn.00401830
mov ecx, dword [ebp - 0x1378]
lea eax, [ebp - 0x113c]
push eax
lea eax, [ebp - 0x1120]
push eax
lea edi, [ebp - 0x13ac]
lea esi, [ebp - 0x139c]
lea ebx, [ebp - 0x1104]
mov byte [ebp - 4], 6
call fcn.004a18e1
or dword [ebp - 0x11c0], 0xffffffff
cmp byte [0x55042b], 0
jne 0x4a1bab
lea eax, [ebp - 0x1360]
push eax
push 0x202
call sub.WS2_32.dll_WSAStartup
test eax, eax
jne 0x4a1bab
mov byte [0x55042b], 1
mov edi, dword [ebp - 0x1370]
mov byte [ebp - 4], 7
mov ebx, dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push 0
push dword [edi]
call ebx
test eax, eax
jne 0x4a1bf9
lea ecx, [ebp - 0x113c]
mov dword [ebp - 0x1368], 1
call fcn.004012e0
lea ecx, [ebp - 0x1120]
call fcn.004012e0
lea ecx, [ebp - 0x1104]
mov byte [ebp - 4], 1
call fcn.004012e0
jmp 0x4a2518
push 6
xor esi, esi
inc esi
push esi
push 2
call sub.WS2_32.dll_socket
mov dword [ebp - 0x1380], eax
cmp eax, 0xffffffff
jne 0x4a1c28
call sub.WS2_32.dll_WSAGetLastError
push eax
push 0x533df0
call fcn.004e23f7
pop ecx
pop ecx
jmp 0x4a24c8
push 0
push dword [edi]
call ebx
test eax, eax
jne 0x4a1c3d
mov dword [ebp - 0x1368], esi
jmp 0x4a24c8
push dword [ebp - 0x1378]
lea eax, [ebp - 0x1190]
call fcn.0049f7ea
pop ecx
lea eax, [ebp - 0x1104]
push eax
lea eax, [ebp - 0x10e8]
mov byte [ebp - 4], 8
call fcn.0049f7ea
pop ecx
push dword [ebp - 0x138c]
lea eax, [ebp - 0x1158]
mov byte [ebp - 4], 9
call fcn.0049f7ea
pop ecx
cmp dword [ebp - 0x10d0], 0x10
mov eax, dword [ebp - 0x10e4]
jae 0x4a1c91
lea eax, [ebp - 0x10e4]
push eax
call sub.WS2_32.dll_gethostbyname
mov esi, eax
test esi, esi
jne 0x4a1cb4
call sub.WS2_32.dll_WSAGetLastError
push eax
push str._gethostbyname_:_socket_error__d.__r_n
call fcn.004e23f7
pop ecx
pop ecx
jmp 0x4a24a7
push 0
push dword [edi]
call ebx
test eax, eax
jne 0x4a1ccd
mov dword [ebp - 0x1368], 1
jmp 0x4a24a7
push 2
pop eax
push dword [ebp - 0x139c]
mov word [ebp - 0x11a0], ax
mov eax, dword [esi + 0xc]
mov eax, dword [eax]
mov eax, dword [eax]
mov dword [ebp - 0x119c], eax
xor eax, eax
lea edi, [ebp - 0x1198]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
call sub.WS2_32.dll_htons
mov word [ebp - 0x119e], ax
push 0x10
lea eax, [ebp - 0x11a0]
push eax
push dword [ebp - 0x1380]
call sub.WS2_32.dll_connect
cmp eax, 0xffffffff
jne 0x4a1d4f
cmp dword [ebp - 0x10d0], 0x10
mov esi, dword [ebp - 0x10e4]
jae 0x4a1d2e
lea esi, [ebp - 0x10e4]
call sub.WS2_32.dll_WSAGetLastError
push eax
movzx eax, word [ebp - 0x139c]
push eax
push esi
push str._connectAndSendData_:_connect__s:_d_error__d.__r_n
call fcn.004e23f7
add esp, 0x10
jmp 0x4a24a7
mov eax, dword [ebp - 0x1370]
xor edi, edi
push edi
push dword [eax]
call ebx
test eax, eax
je 0x4a1cbe
push edi
lea ecx, [ebp - 0x1094]
mov dword [ebp - 0x107c], 0xf
call fcn.00401660
mov byte [ebp - 4], 0xb
lea eax, [ebp - 0x1094]
push eax
mov edx, str.GET
cmp dword [ebp - 0x1144], edi
je 0x4a1d97
mov edx, str.POST
call fcn.0041fb40
push 0xffffffffffffffff
push edi
lea eax, [ebp - 0x1190]
push eax
lea ecx, [ebp - 0x1094]
call fcn.0041fc70
lea eax, [ebp - 0x1094]
push eax
mov edx, str._HTTP_1.1_r_n
call fcn.0041fb40
lea eax, [ebp - 0x1094]
push eax
mov edx, str.Host:
call fcn.0041fb40
push 0xffffffffffffffff
push edi
lea eax, [ebp - 0x10e8]
push eax
lea ecx, [ebp - 0x1094]
call fcn.0041fc70
lea eax, [ebp - 0x1094]
mov esi, 0x533e9c
push eax
mov edx, esi
call fcn.0041fb40
lea eax, [ebp - 0x1094]
push eax
mov edx, str.Accept:___r_n
call fcn.0041fb40
lea eax, [ebp - 0x1094]
push eax
mov edx, 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
call fcn.0041fb40
lea eax, [ebp - 0x1094]
push eax
mov edx, str.Connection:_Keep_Alive_r_n
call fcn.0041fb40
lea eax, [ebp - 0x1094]
push eax
mov edx, 0x533f40
call fcn.0041fb40
cmp dword [ebp - 0x1144], edi
je 0x4a1e6d
push dword [ebp - 0x1144]
lea eax, [ebp - 0x78]
push str.Content_Length:__d_r_n
push eax
call fcn.004e208e
add esp, 0xc
lea eax, [ebp - 0x1094]
push eax
lea edx, [ebp - 0x78]
call fcn.0041fb40
lea eax, [ebp - 0x1094]
push eax
mov edx, esi
call fcn.0041fb40
push 0xffffffffffffffff
push edi
lea eax, [ebp - 0x1158]
push eax
lea ecx, [ebp - 0x1094]
call fcn.0041fc70
cmp dword [ebp - 0x107c], 0x10
mov eax, dword [ebp - 0x1090]
jae 0x4a1ea5
lea eax, [ebp - 0x1090]
push edi
push dword [ebp - 0x1080]
push eax
push dword [ebp - 0x1380]
call sub.WS2_32.dll_send
cmp eax, 0xffffffff
jne 0x4a1ed4
call sub.WS2_32.dll_WSAGetLastError
push eax
push str._connectAndSendData_:_send_error__d.__r_n
call fcn.004e23f7
pop ecx
pop ecx
jmp 0x4a249c
mov eax, dword [ebp - 0x1370]
push edi
push dword [eax]
call ebx
test eax, eax
jne 0x4a1ef2
mov dword [ebp - 0x1368], 1
jmp 0x4a249c
xor edi, edi
push edi
lea ecx, [ebp - 0x1174]
mov dword [ebp - 0x115c], 0xf
call fcn.00401660
mov ebx, dword [ebp - 0x137c]
lea esi, [ebx + 0x64]
mov byte [ebp - 4], 0xc
call fcn.0041b580
lea esi, [ebx + 0x54]
call fcn.0041b580
push 0xfff
lea eax, [ebp - 0x1077]
push edi
push eax
mov byte [ebp - 0x1078], 0
call fcn.004e57c0
add esp, 0xc
or dword [ebp - 0x1364], 0xffffffff
mov dword [ebp - 0x1390], edi
mov dword [ebp - 0x1388], edi
mov esi, dword [ebp - 0x1380]
lea eax, [ebp - 0x13a8]
push eax
push 0
push 0
lea eax, [ebp - 0x14d0]
push eax
lea eax, [esi + 1]
push eax
mov dword [ebp - 0x13a8], 0xa
mov dword [ebp - 0x13a4], 0x3e8
mov dword [ebp - 0x14cc], esi
mov dword [ebp - 0x14d0], 1
call sub.WS2_32.dll_select
test eax, eax
jle 0x4a2491
mov eax, dword [ebp - 0x1370]
mov edi, dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push 0
push dword [eax]
call edi
test eax, eax
je 0x4a25da
lea eax, [ebp - 0x14d0]
push eax
push esi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x4a2491
mov eax, dword [ebp - 0x1370]
push 0
push dword [eax]
call edi
test eax, eax
je 0x4a25da
mov edi, 0x1000
push edi
lea eax, [ebp - 0x1078]
push 0
push eax
call fcn.004e57c0
add esp, 0xc
push 0
push edi
lea eax, [ebp - 0x1078]
push eax
push esi
call sub.WS2_32.dll_recv
mov dword [ebp - 0x1374], eax
test eax, eax
jle 0x4a2491
mov eax, dword [ebp - 0x1370]
push 0
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x4a25da
mov eax, dword [ebp - 0x1374]
mov ecx, dword [ebp - 0x1390]
lea edi, [eax + ecx]
lea esi, [ebx + 0x64]
call fcn.0041b1e0
push dword [ebp - 0x1374]
mov eax, dword [ebx + 0x6c]
lea ecx, [ebp - 0x1078]
push ecx
mov ecx, dword [ebp - 0x1390]
add eax, ecx
push eax
call fcn.004e9720
mov ecx, dword [ebx + 0x10]
add esp, 0xc
mov dword [ebp - 0x1390], edi
test ecx, ecx
je 0x4a2084
fldz
mov eax, dword [ecx]
push ecx
push ecx
fstp qword [esp]
push 0
push ebx
call dword [eax + 4]
mov esi, dword [ebx + 0x6c]
mov eax, dword [ebp - 0x1390]
lea edi, [esi + eax]
push str._r_n_r_n
push esi
mov dword [ebp - 0x1384], esi
mov dword [ebp - 0x136c], edi
call fcn.004e2350
pop ecx
pop ecx
test eax, eax
je 0x4a2421
cmp eax, edi
jae 0x4a2421
add eax, 4
cmp dword [ebx + 0x7c], 0xffffffff
mov dword [ebp - 0x1374], eax
mov dword [ebp - 0x1388], eax
jne 0x4a2136
push str.HTTP_1.1
push esi
call fcn.004e2350
mov esi, eax
pop ecx
pop ecx
test esi, esi
je 0x4a2136
cmp esi, edi
jae 0x4a2136
add esi, 9
push 0x52e734
push esi
call fcn.004e2350
pop ecx
pop ecx
test eax, eax
je 0x4a2136
cmp eax, edi
jae 0x4a2136
sub eax, esi
push eax
push esi
lea ecx, [ebp - 0x10b0]
call fcn.004a01bd
cmp dword [ebp - 0x1098], 0x10
mov eax, dword [ebp - 0x10ac]
jae 0x4a2121
lea eax, [ebp - 0x10ac]
push eax
call fcn.004e23ec
pop ecx
lea ecx, [ebp - 0x10b0]
mov dword [ebx + 0x7c], eax
call fcn.00401250
mov eax, dword [ebx + 0x7c]
cmp eax, 0x12e
je 0x4a214b
cmp eax, 0x12d
jne 0x4a21cf
cmp dword [ebp - 0x1160], 0
jne 0x4a25e9
push str.Location:
push dword [ebp - 0x1384]
call fcn.004e2350
mov esi, eax
pop ecx
pop ecx
test esi, esi
je 0x4a21cf
cmp esi, dword [ebp - 0x136c]
jae 0x4a21cf
mov edi, 0x533e9c
add esi, 0xa
push edi
push esi
call fcn.004e2350
pop ecx
pop ecx
test eax, eax
je 0x4a21d4
cmp eax, dword [ebp - 0x136c]
jae 0x4a21d4
sub eax, esi
push eax
push esi
lea ecx, [ebp - 0x10cc]
call fcn.004a01bd
push 0xffffffffffffffff
push 0
lea eax, [ebp - 0x10cc]
push eax
lea ecx, [ebp - 0x1174]
mov byte [ebp - 4], 0xd
call fcn.00401310
lea ecx, [ebp - 0x10cc]
mov byte [ebp - 4], 0xc
call fcn.00401250
jmp 0x4a21d4
mov edi, 0x533e9c
cmp dword [ebp - 0x1160], 0
jne 0x4a25e9
cmp dword [ebp - 0x1364], 0xffffffff
jne 0x4a2421
push str.Content_Length:
push dword [ebp - 0x1384]
call fcn.004e2350
mov esi, eax
pop ecx
pop ecx
test esi, esi
je 0x4a2262
cmp esi, dword [ebp - 0x136c]
jae 0x4a2262
add esi, 0x10
push edi
push esi
call fcn.004e2350
pop ecx
pop ecx
test eax, eax
je 0x4a2262
cmp eax, dword [ebp - 0x136c]
jae 0x4a2262
sub eax, esi
push eax
push esi
lea ecx, [ebp - 0x10b0]
call fcn.004a01bd
cmp dword [ebp - 0x1098], 0x10
mov eax, dword [ebp - 0x10ac]
jae 0x4a224a
lea eax, [ebp - 0x10ac]
push eax
call fcn.004e23ec
pop ecx
lea ecx, [ebp - 0x10b0]
mov dword [ebp - 0x1364], eax
call fcn.00401250
cmp dword [ebp - 0x1364], 0xffffffff
jne 0x4a2421
push edi
push dword [ebp - 0x1374]
call fcn.004e2350
mov esi, eax
pop ecx
pop ecx
test esi, esi
je 0x4a22ed
cmp esi, dword [ebp - 0x136c]
jae 0x4a22ed
sub eax, dword [ebp - 0x1374]
lea ecx, [ebp - 0x10b0]
push eax
push dword [ebp - 0x1374]
call fcn.004a01bd
cmp dword [ebp - 0x1098], 0x10
mov eax, dword [ebp - 0x10ac]
jae 0x4a22b8
lea eax, [ebp - 0x10ac]
lea ecx, [ebp - 0x1364]
push ecx
push 0x533fe8
push eax
call fcn.004e21b5
add esp, 0xc
cmp eax, 1
jne 0x4a22e2
add dword [ebp - 0x1364], 7
add esi, 2
mov dword [ebp - 0x1388], esi
lea ecx, [ebp - 0x10b0]
call fcn.00401250
cmp dword [ebp - 0x1364], 0xffffffff
jne 0x4a2421
push str.Connection:
push dword [ebp - 0x1384]
call fcn.004e2350
mov esi, eax
pop ecx
pop ecx
test esi, esi
je 0x4a2421
cmp esi, dword [ebp - 0x136c]
jae 0x4a2421
add esi, 0xc
push edi
push esi
call fcn.004e2350
pop ecx
pop ecx
test eax, eax
je 0x4a2421
cmp eax, dword [ebp - 0x136c]
jae 0x4a2421
sub eax, esi
push eax
push esi
lea ecx, [ebp - 0x10cc]
call fcn.004a01bd
mov byte [ebp - 4], 0xf
cmp dword [ebp - 0x10b4], 0x10
mov eax, dword [ebp - 0x10c8]
jae 0x4a236a
lea eax, [ebp - 0x10c8]
lea ecx, [ebp - 0x10b0]
call fcn.0049f7c4
push str.CLOSE
lea ecx, [ebp - 0x13c8]
mov byte [ebp - 4], 0x10
call fcn.004012a0
mov eax, dword [ebp - 0x13b4]
mov ecx, dword [ebp - 0x109c]
mov dword [ebp - 0x1374], eax
mov dword [ebp - 0x13a0], ecx
lea edx, [ebp - 0x1374]
cmp ecx, eax
jb 0x4a23b1
lea edx, [ebp - 0x13a0]
cmp dword [ebp - 0x13b0], 8
mov eax, dword [ebp - 0x13c4]
jae 0x4a23c6
lea eax, [ebp - 0x13c4]
cmp dword [ebp - 0x1098], 8
mov ecx, dword [ebp - 0x10ac]
jae 0x4a23db
lea ecx, [ebp - 0x10ac]
push dword [edx]
call fcn.004a743a
mov ebx, eax
neg ebx
pop ecx
sbb bl, bl
lea ecx, [ebp - 0x13c8]
inc bl
call fcn.004012e0
test bl, bl
je 0x4a2401
and dword [ebp - 0x1364], 0
lea ecx, [ebp - 0x10b0]
call fcn.004012e0
lea ecx, [ebp - 0x10cc]
mov byte [ebp - 4], 0xc
call fcn.00401250
mov ebx, dword [ebp - 0x137c]
cmp dword [ebp - 0x1388], 0
je 0x4a1f53
mov edi, dword [ebp - 0x1364]
test edi, edi
jle 0x4a1f53
mov eax, dword [ebp - 0x1388]
sub eax, dword [ebp - 0x1384]
mov ecx, dword [ebp - 0x136c]
sub ecx, dword [ebp - 0x1384]
add eax, edi
cmp ecx, eax
jl 0x4a1f53
cmp dword [ebx + 0x7c], 0xc8
jne 0x4a2471
mov dword [ebp - 0x1398], 1
lea esi, [ebx + 0x54]
call fcn.0041b1e0
push dword [ebp - 0x1364]
mov ebx, dword [ebx + 0x5c]
push dword [ebp - 0x1388]
push ebx
call fcn.004e9720
add esp, 0xc
lea ecx, [ebp - 0x1174]
call fcn.00401250
lea ecx, [ebp - 0x1094]
call fcn.00401250
lea ecx, [ebp - 0x1158]
call fcn.00401250
lea ecx, [ebp - 0x10e8]
call fcn.00401250
lea ecx, [ebp - 0x1190]
call fcn.00401250
lea ecx, [ebp - 0x113c]
call fcn.004012e0
lea ecx, [ebp - 0x1120]
call fcn.004012e0
lea ecx, [ebp - 0x1104]
mov byte [ebp - 4], 1
call fcn.004012e0
cmp dword [ebp - 0x1380], 0xffffffff
je 0x4a2518
push dword [ebp - 0x1380]
call sub.WS2_32.dll_closesocket
cmp eax, 0xffffffff
jne 0x4a2518
call sub.WS2_32.dll_WSAGetLastError
push eax
push str._connectAndSendData_:_closesocket_error__d.__r_n
call fcn.004e23f7
pop ecx
pop ecx
mov esi, dword [ebp - 0x137c]
xor edi, edi
mov ecx, dword [esi + 0x10]
cmp ecx, edi
je 0x4a2599
cmp dword [ebp - 0x1368], edi
jne 0x4a2599
cmp dword [ebp - 0x1394], edi
jne 0x4a1a2f
cmp dword [ebp - 0x1398], edi
push dword [ebp - 0x1370]
mov eax, dword [ecx]
sete dl
movzx edx, dl
push edx
push esi
lea edx, [ebp - 0x10cc]
push edx
call dword [eax]
push 0xffffffffffffffff
push edi
push eax
lea ecx, [ebp - 0x11bc]
mov byte [ebp - 4], 0x11
call fcn.004019d0
lea ecx, [ebp - 0x10cc]
mov byte [ebp - 4], 1
call fcn.004012e0
cmp dword [ebp - 0x11a8], edi
je 0x4a25a5
mov eax, dword [ebp - 0x138c]
call fcn.0041b5a0
mov dword [ebp - 0x1394], 1
cmp dword [ebp - 0x1394], edi
jne 0x4a1a2f
lea ecx, [ebp - 0x11bc]
call fcn.004012e0
lea ecx, [ebp + 0xc]
call fcn.004012e0
mov eax, dword [ebp - 0x1398]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004df2ac
leave
ret 0x20
mov dword [ebp - 0x1368], 1
jmp 0x4a2491
cmp dword [ebp - 0x115c], 0x10
mov eax, dword [ebp - 0x1170]
jae 0x4a25fe
lea eax, [ebp - 0x1170]
lea ecx, [ebp - 0x10cc]
call fcn.0049f7c4
push 0xffffffffffffffff
push 0
push eax
lea ecx, [ebp - 0x11bc]
mov byte [ebp - 4], 0xe
call fcn.004019d0
lea ecx, [ebp - 0x10cc]
mov byte [ebp - 4], 0xc
call fcn.004012e0
mov eax, dword [ebp - 0x138c]
call fcn.0041b5a0
mov dword [ebp - 0x1394], 1
jmp 0x4a2491