Function at 0x430570
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 0x4b7293
mov eax, dword fs:[0]
push eax
mov eax, 0x14b8
call fcn.004866d0
mov eax, dword [0x4e7950]
xor eax, esp
mov dword [esp + 0x14b0], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4e7950]
xor eax, esp
push eax
lea eax, [esp + 0x14cc]
mov dword fs:[0], eax
mov ebp, dword [esp + 0x14dc]
mov eax, dword [esp + 0x14e0]
mov dword [esp + 0x1c], ebp
xor edi, edi
push eax
lea ecx, [esp + 0x2a0]
mov dword [esp + 0x14d8], edi
call fcn.004026d0
mov byte [esp + 0x14d4], 1
nop
lea eax, [esp + 0x29c]
lea esi, [ebp + 0x14]
push eax
mov ecx, esi
mov dword [esp + 0x1c], edi
mov dword [ebp + 0x7c], 0xffffffff
mov dword [esp + 0x30], edi
mov dword [esp + 0x34], edi
call fcn.0042d7a0
lea ecx, [esp + 0x14e4]
push ecx
lea ecx, [ebp + 0x30]
call fcn.0042d7a0
cmp dword [ebp + 0x44], edi
jne 0x4306aa
push 0x4d0e54
call fcn.00401550
add esp, 4
push eax
push 0x4d0e54
push esi
call fcn.00431f70
mov esi, eax
cmp esi, 0xffffffff
je 0x4306aa
lea edi, [ebp + 0x14]
lea ebx, [esi + 1]
mov eax, edi
lea ecx, [esp + 0x1e4]
call fcn.00444e10
push eax
lea ecx, [ebp + 0x30]
mov byte [esp + 0x14d8], 2
call fcn.0042d7a0
mov bl, 1
lea ecx, [esp + 0x1e4]
mov byte [esp + 0x14d4], bl
call fcn.00402710
mov eax, esi
lea ecx, [esp + 0x1e4]
call fcn.00444de0
push eax
lea ecx, [ebp + 0x14]
mov byte [esp + 0x14d8], 3
call fcn.0042d7a0
lea ecx, [esp + 0x1e4]
mov byte [esp + 0x14d4], bl
call fcn.00402710
mov edx, dword [ebp + 0xc]
push 0
push edx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x4306c7
mov dword [esp + 0x18], 1
jmp 0x43114f
lea ecx, [esp + 0x1ac]
call fcn.0042c6f0
lea ecx, [esp + 0x1c8]
call fcn.0042c6f0
lea ecx, [esp + 0x200]
call fcn.0042c6f0
lea eax, [esp + 0x4c]
push eax
lea ecx, [esp + 0x3c]
push ecx
lea ebx, [esp + 0x208]
lea edi, [esp + 0x1d0]
lea esi, [esp + 0x1b4]
lea ecx, [ebp + 0x14]
mov byte [esp + 0x14dc], 6
call fcn.00430470
xor edi, edi
cmp byte [0x4ed660], 0
mov dword [esp + 0x2c8], 0xffffffff
jne 0x43074d
lea edx, [esp + 0x2cc]
push edx
push 0x202
call sub.WS2_32.dll_WSAStartup
cmp eax, edi
jne 0x43074d
mov byte [0x4ed660], 1
mov byte [esp + 0x14d4], 7
mov eax, dword [ebp + 0xc]
mov esi, dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push edi
push eax
call esi
test eax, eax
jne 0x43079f
lea ecx, [esp + 0x200]
mov dword [esp + 0x18], 1
call fcn.00402710
lea ecx, [esp + 0x1c8]
call fcn.00402710
lea ecx, [esp + 0x1ac]
mov byte [esp + 0x14d4], 1
call fcn.00402710
jmp 0x43114f
push 6
push 1
push 2
call sub.WS2_32.dll_socket
mov ebx, eax
mov dword [esp + 0x34], ebx
cmp ebx, 0xffffffff
jne 0x4307cd
call sub.WS2_32.dll_WSAGetLastError
push eax
push str._connectAndSendData_:_socket_error__d.__r_n
call fcn.004826c7
add esp, 8
jmp 0x431100
mov ecx, dword [ebp + 0xc]
push edi
push ecx
call esi
test eax, eax
jne 0x4307e5
mov dword [esp + 0x18], 1
jmp 0x431100
lea ecx, [ebp + 0x14]
lea esi, [esp + 0x264]
call fcn.0042f740
lea ecx, [esp + 0x1ac]
lea esi, [esp + 0x238]
mov byte [esp + 0x14d4], 8
call fcn.0042f740
lea ecx, [ebp + 0x30]
lea esi, [esp + 0x21c]
mov byte [esp + 0x14d4], 9
call fcn.0042f740
lea ecx, [esp + 0x238]
call fcn.004086e0
push eax
call sub.WS2_32.dll_gethostbyname
mov esi, eax
cmp esi, edi
jne 0x430856
call sub.WS2_32.dll_WSAGetLastError
push eax
push str._gethostbyname_:_socket_error__d.__r_n
call fcn.004826c7
add esp, 8
jmp 0x4310dc
mov edx, dword [ebp + 0xc]
push edi
push edx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x430872
mov dword [esp + 0x18], 1
jmp 0x4310dc
mov eax, 2
mov word [esp + 0x254], ax
mov ecx, dword [esi + 0xc]
mov edx, dword [ecx]
mov eax, dword [edx]
mov esi, dword [esp + 0x38]
mov dword [esp + 0x258], eax
xor eax, eax
push esi
mov dword [esp + 0x260], eax
mov dword [esp + 0x264], eax
call sub.WS2_32.dll_htons
push 0x10
lea ecx, [esp + 0x258]
push ecx
push ebx
mov word [esp + 0x262], ax
call sub.WS2_32.dll_connect
cmp eax, 0xffffffff
jne 0x4308ed
call sub.WS2_32.dll_WSAGetLastError
movzx edx, si
push eax
push edx
lea ecx, [esp + 0x240]
call fcn.004086e0
push eax
push str._connectAndSendData_:_connect__s:_d_error__d.__r_n
call fcn.004826c7
add esp, 0x10
jmp 0x4310dc
mov eax, dword [ebp + 0xc]
mov esi, dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push edi
push eax
call esi
test eax, eax
jne 0x43090b
mov dword [esp + 0x18], 1
jmp 0x4310dc
lea ecx, [esp + 0x190]
call fcn.00429180
lea ecx, [esp + 0x21c]
mov byte [esp + 0x14d4], 0xb
call fcn.00402630
lea ecx, [esp + 0x190]
test al, al
je 0x43093d
push str.GET
jmp 0x430942
push 0x4d0ee8
call fcn.004291b0
push 0xffffffffffffffff
push edi
lea ecx, [esp + 0x26c]
push ecx
lea ecx, [esp + 0x19c]
call fcn.004292d0
push str._HTTP_1.1_r_n
lea ecx, [esp + 0x194]
call fcn.004291b0
push str.Host:
lea ecx, [esp + 0x194]
call fcn.004291b0
push 0xffffffffffffffff
push edi
lea edx, [esp + 0x240]
push edx
lea ecx, [esp + 0x19c]
call fcn.004292d0
push 0x4d0f04
lea ecx, [esp + 0x194]
call fcn.004291b0
push str.Accept:___r_n
lea ecx, [esp + 0x194]
call fcn.004291b0
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.004291b0
push str.Connection:_Keep_Alive_r_n
lea ecx, [esp + 0x194]
call fcn.004291b0
push 0x4d0fa8
lea ecx, [esp + 0x194]
call fcn.004291b0
lea ecx, [esp + 0x21c]
call fcn.00402630
test al, al
jne 0x430a32
lea ecx, [esp + 0x21c]
call fcn.00402750
push eax
lea eax, [esp + 0x460]
push str.Content_Length:__d_r_n
push eax
call fcn.004824d5
add esp, 0xc
lea ecx, [esp + 0x45c]
push ecx
lea ecx, [esp + 0x194]
call fcn.004291b0
push 0x4d0f04
lea ecx, [esp + 0x194]
call fcn.004291b0
push 0xffffffffffffffff
push edi
lea edx, [esp + 0x224]
push edx
lea ecx, [esp + 0x19c]
call fcn.004292d0
push edi
lea ecx, [esp + 0x194]
call fcn.00402750
push eax
lea ecx, [esp + 0x198]
call fcn.004086e0
push eax
push ebx
call sub.WS2_32.dll_send
cmp eax, 0xffffffff
jne 0x430a98
call sub.WS2_32.dll_WSAGetLastError
push eax
push str._connectAndSendData_:_send_error__d.__r_n
call fcn.004826c7
add esp, 8
jmp 0x4310d0
mov eax, dword [ebp + 0xc]
push edi
push eax
call esi
test eax, eax
jne 0x430ab0
mov dword [esp + 0x18], 1
jmp 0x4310d0
lea ecx, [esp + 0x280]
call fcn.00429180
lea ecx, [ebp + 0x64]
mov byte [esp + 0x14d4], 0xc
call fcn.0041fa90
lea ecx, [ebp + 0x54]
call fcn.0041fa90
push 0xfff
lea ecx, [esp + 0x4c9]
push edi
push ecx
mov byte [esp + 0x4d0], 0
call fcn.004865d0
add esp, 0xc
mov dword [esp + 0x28], edi
mov dword [esp + 0x14], 0xffffffff
mov dword [esp + 0x24], edi
mov ebx, dword [esp + 0x34]
lea edx, [esp + 0x44]
push edx
push 0
push 0
lea eax, [esp + 0x78]
push eax
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
mov ebp, dword [esp + 0x1c]
test eax, eax
jle 0x4310c4
mov ecx, dword [ebp + 0xc]
mov esi, dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push 0
push ecx
call esi
test eax, eax
je 0x4311d1
lea edx, [esp + 0x6c]
push edx
push ebx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x4310c4
mov eax, dword [ebp + 0xc]
push 0
push eax
call esi
test eax, eax
je 0x4311d1
push 0x1000
lea ecx, [esp + 0x4c8]
push 0
push ecx
call fcn.004865d0
add esp, 0xc
push 0
push 0x1000
lea edx, [esp + 0x4cc]
push edx
push ebx
call sub.WS2_32.dll_recv
mov edi, eax
test edi, edi
jle 0x4310c4
mov eax, dword [ebp + 0xc]
push 0
push eax
call esi
test eax, eax
je 0x4311da
mov ecx, dword [esp + 0x28]
lea esi, [edi + ecx]
lea ebx, [ebp + 0x64]
push esi
mov ecx, ebx
call fcn.0041f120
push edi
lea edx, [esp + 0x4c8]
push edx
mov ecx, ebx
call fcn.0041e9d0
add eax, dword [esp + 0x30]
push eax
call fcn.0048db60
mov ecx, dword [ebp + 0x10]
add esp, 0xc
mov dword [esp + 0x28], esi
test ecx, ecx
je 0x430c17
fldz
mov eax, dword [ecx]
mov edx, dword [eax + 4]
sub esp, 8
fstp qword [esp]
push 0
push ebp
call edx
mov esi, ebp
lea ecx, [esi + 0x64]
call fcn.0041e9d0
mov ebp, eax
mov eax, dword [esp + 0x28]
lea edi, [eax + ebp]
push str._r_n_r_n
push ebp
mov dword [esp + 0x28], edi
call fcn.00482620
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x431057
cmp ebx, edi
jae 0x431057
add ebx, 4
cmp dword [esi + 0x7c], 0xffffffff
mov dword [esp + 0x24], ebx
jne 0x430cf2
push str.HTTP_1.1
push ebp
call fcn.00482620
mov esi, eax
add esp, 8
test esi, esi
je 0x430cf2
cmp esi, edi
jae 0x430cf2
add esi, 9
push 0x4d1030
push esi
call fcn.00482620
add esp, 8
test eax, eax
je 0x430cf2
cmp eax, edi
jae 0x430cf2
push ecx
sub eax, esi
mov ecx, esp
mov edi, eax
call fcn.00403090
lea ecx, [esp + 0x178]
call fcn.00403070
push 0
push 0
lea ecx, [esp + 0x17c]
call fcn.00402ff0
push edi
push esi
lea ecx, [esp + 0x17c]
call fcn.00403710
lea ecx, [esp + 0x174]
call fcn.004086e0
push eax
call fcn.004826bc
mov ecx, dword [esp + 0x20]
mov dword [ecx + 0x7c], eax
add esp, 4
lea ecx, [esp + 0x174]
call fcn.00402610
mov edi, dword [esp + 0x20]
mov edx, dword [esp + 0x1c]
mov eax, dword [edx + 0x7c]
cmp eax, 0x12e
je 0x430d0b
cmp eax, 0x12d
jne 0x430dc6
lea ecx, [esp + 0x280]
call fcn.00402630
test al, al
je 0x430dc6
push str.Location:
push ebp
call fcn.00482620
mov esi, eax
add esp, 8
test esi, esi
je 0x430dc6
cmp esi, edi
jae 0x430dc6
add esi, 0xa
push 0x4d0f04
push esi
call fcn.00482620
add esp, 8
test eax, eax
je 0x430dc6
cmp eax, edi
jae 0x430dc6
push ecx
sub eax, esi
mov ecx, esp
mov edi, eax
call fcn.00403090
lea ecx, [esp + 0x178]
call fcn.00403070
push 0
push 0
lea ecx, [esp + 0x17c]
call fcn.00402ff0
push edi
push esi
lea ecx, [esp + 0x17c]
call fcn.00403710
push 0xffffffffffffffff
push 0
lea eax, [esp + 0x17c]
push eax
lea ecx, [esp + 0x28c]
mov byte [esp + 0x14e0], 0xd
call fcn.00402f00
lea ecx, [esp + 0x174]
mov byte [esp + 0x14d4], 0xc
call fcn.00402610
mov edi, dword [esp + 0x20]
lea ecx, [esp + 0x280]
call fcn.00402630
test al, al
je 0x4311e7
mov ecx, dword [esp + 0x14]
cmp ecx, 0xffffffff
jne 0x43105b
push str.Content_Length:
push ebp
call fcn.00482620
mov esi, eax
add esp, 8
test esi, esi
je 0x430e73
cmp esi, edi
jae 0x430e73
add esi, 0x10
push 0x4d0f04
push esi
call fcn.00482620
add esp, 8
test eax, eax
je 0x430e73
cmp eax, edi
jae 0x430e73
push ecx
sub eax, esi
mov ecx, esp
mov edi, eax
call fcn.00403090
lea ecx, [esp + 0x178]
call fcn.00403070
push 0
push 0
lea ecx, [esp + 0x17c]
call fcn.00402ff0
push edi
push esi
lea ecx, [esp + 0x17c]
call fcn.00403710
lea ecx, [esp + 0x174]
call fcn.004086e0
push eax
call fcn.004826bc
add esp, 4
lea ecx, [esp + 0x174]
mov dword [esp + 0x14], eax
call fcn.00402610
mov ecx, dword [esp + 0x14]
cmp ecx, 0xffffffff
jne 0x43105b
push 0x4d0f04
push ebx
call fcn.00482620
mov edi, eax
add esp, 8
test edi, edi
je 0x430f0c
cmp edi, dword [esp + 0x20]
jae 0x430f0c
push ecx
mov esi, edi
mov ecx, esp
sub esi, ebx
call fcn.00403090
lea ecx, [esp + 0x178]
call fcn.00403070
push 0
push 0
lea ecx, [esp + 0x17c]
call fcn.00402ff0
push esi
push ebx
lea ecx, [esp + 0x17c]
call fcn.00403710
lea ecx, [esp + 0x14]
push ecx
push 0x4d1054
lea ecx, [esp + 0x17c]
call fcn.004086e0
push eax
call fcn.004825fc
add esp, 0xc
cmp eax, 1
jne 0x430f00
add dword [esp + 0x14], 7
add edi, 2
mov dword [esp + 0x24], edi
lea ecx, [esp + 0x174]
call fcn.00402610
mov ecx, dword [esp + 0x14]
cmp ecx, 0xffffffff
jne 0x43105b
push str.Connection:
push ebp
call fcn.00482620
mov esi, eax
add esp, 8
test esi, esi
je 0x431057
cmp esi, dword [esp + 0x20]
jae 0x431057
add esi, 0xc
push 0x4d0f04
push esi
call fcn.00482620
add esp, 8
test eax, eax
je 0x431057
cmp eax, dword [esp + 0x20]
jae 0x431057
push ecx
sub eax, esi
mov ecx, esp
mov edi, eax
call fcn.00403090
lea ecx, [esp + 0x178]
call fcn.00403070
push 0
push 0
lea ecx, [esp + 0x17c]
call fcn.00402ff0
push edi
push esi
lea ecx, [esp + 0x17c]
call fcn.00403710
lea ecx, [esp + 0x174]
mov byte [esp + 0x14d4], 0xf
call fcn.004086e0
mov ecx, eax
lea eax, [esp + 0x1e4]
call fcn.0042f710
push str.CLOSE
lea ecx, [esp + 0x54]
mov byte [esp + 0x14d8], 0x10
call fcn.004026d0
lea ecx, [esp + 0x50]
call fcn.00402750
mov esi, eax
lea ecx, [esp + 0x1e4]
mov dword [esp + 0x3c], esi
call fcn.00402750
mov dword [esp + 0x40], eax
cmp eax, esi
lea eax, [esp + 0x3c]
jb 0x430ff7
lea eax, [esp + 0x40]
mov edx, dword [eax]
push edx
lea ecx, [esp + 0x54]
call fcn.00402730
lea ecx, [esp + 0x1e8]
mov esi, eax
call fcn.00402730
mov ecx, eax
mov eax, esi
call fcn.00444d20
add esp, 4
test eax, eax
lea ecx, [esp + 0x50]
sete bl
call fcn.00402710
test bl, bl
je 0x431037
mov dword [esp + 0x14], 0
lea ecx, [esp + 0x1e4]
call fcn.00402710
lea ecx, [esp + 0x174]
mov byte [esp + 0x14d4], 0xc
call fcn.00402610
mov ecx, dword [esp + 0x14]
cmp dword [esp + 0x24], 0
je 0x430b02
test ecx, ecx
jle 0x430b02
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 0x430b02
mov eax, dword [esp + 0x1c]
cmp dword [eax + 0x7c], 0xc8
jne 0x43109b
mov dword [esp + 0x2c], 1
lea esi, [eax + 0x54]
push ecx
mov ecx, esi
call fcn.0041f120
mov ecx, dword [esp + 0x14]
push ecx
push edi
mov ecx, esi
call fcn.0041e9d0
push eax
call fcn.0048db60
add esp, 0xc
mov ebp, dword [esp + 0x1c]
mov ebx, dword [esp + 0x34]
lea ecx, [esp + 0x280]
call fcn.00402610
lea ecx, [esp + 0x190]
call fcn.00402610
lea ecx, [esp + 0x21c]
call fcn.00402610
lea ecx, [esp + 0x238]
call fcn.00402610
lea ecx, [esp + 0x264]
call fcn.00402610
lea ecx, [esp + 0x200]
call fcn.00402710
lea ecx, [esp + 0x1c8]
call fcn.00402710
lea ecx, [esp + 0x1ac]
mov byte [esp + 0x14d4], 1
call fcn.00402710
cmp ebx, 0xffffffff
je 0x43114f
push ebx
call sub.WS2_32.dll_closesocket
cmp eax, 0xffffffff
jne 0x43114f
call sub.WS2_32.dll_WSAGetLastError
push eax
push str._connectAndSendData_:_closesocket_error__d.__r_n
call fcn.004826c7
add esp, 8
mov ecx, dword [ebp + 0x10]
xor edi, edi
cmp ecx, edi
je 0x431243
cmp dword [esp + 0x18], edi
jne 0x431243
cmp dword [esp + 0x30], edi
jne 0x4305e0
cmp dword [esp + 0x2c], edi
mov edx, dword [ecx]
mov edx, dword [edx]
lea eax, [ebp + 0xc]
push eax
sete al
movzx eax, al
push eax
push ebp
lea eax, [esp + 0x1f0]
push eax
call edx
push eax
lea ecx, [esp + 0x2a0]
mov byte [esp + 0x14d8], 0x11
call fcn.0042d7a0
lea ecx, [esp + 0x1e4]
mov byte [esp + 0x14d4], 1
call fcn.00402710
cmp dword [esp + 0x2b0], edi
je 0x43124d
lea eax, [ebp + 0x30]
call fcn.0043b4d0
jmp 0x4305e0
mov dword [esp + 0x18], edi
jmp 0x4310c4
mov dword [esp + 0x18], 1
jmp 0x4310c4
lea ecx, [esp + 0x280]
call fcn.004086e0
mov ecx, eax
lea eax, [esp + 0x1e4]
call fcn.0042f710
push eax
lea ecx, [esp + 0x2a0]
mov byte [esp + 0x14d8], 0xe
call fcn.0042d7a0
lea ecx, [esp + 0x1e4]
mov byte [esp + 0x14d4], 0xc
call fcn.00402710
mov eax, dword [esp + 0x1c]
add eax, 0x30
call fcn.0043b4d0
mov dword [esp + 0x30], 1
jmp 0x4310bc
cmp dword [esp + 0x30], edi
jne 0x4305e0
lea ecx, [esp + 0x29c]
call fcn.00402710
lea ecx, [esp + 0x14e4]
call fcn.00402710
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.00480723
add esp, 0x14c4
ret 0x24