Function at 0x474440
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
Make an http request with a cookie
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
Set socket configuration

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x53939b
mov eax, dword fs:[0]
push eax
push ebx
mov eax, 0x1a60
call fcn.00502a70
mov eax, dword [0x57d54c]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x1a68], edx
mov eax, dword [ebx + 8]
mov dword [ebp - 0x1a6c], eax
test ecx, ecx
je 0x474a54
cmp byte [ecx], 0
je 0x474a54
push ecx
lea ecx, [ebp - 0x1a4c]
call fcn.004082b0
mov dword [ebp - 4], 0
nop dword [eax + eax]
cmp dword [ebp - 0x1a38], 0x10
lea eax, [ebp - 0x128]
push 0x80
push 0
lea esi, [ebp - 0x1a4c]
cmovae esi, dword [ebp - 0x1a4c]
push eax
call fcn.00504c70
add esp, 0xc
mov dword [ebp - 0x1a64], 0x50
push 0x564908
push esi
call fcn.005046b0
mov edi, eax
add esp, 8
test edi, edi
jne 0x474515
mov eax, esi
neg eax
cmp eax, 0x13
jg 0x474a42
mov eax, edi
sub eax, esi
push eax
push esi
lea eax, [ebp - 0x128]
push 0x80
push eax
call fcn.0050d9cf
lea eax, [ebp - 0x128]
add edi, 3
push str.http
push eax
call fcn.0051362b
add esp, 0x18
test eax, eax
jne 0x474a42
push 0x2f
push edi
call fcn.005041c0
mov esi, eax
lea eax, [ebp - 0x128]
push 0x80
push 0
push eax
mov dword [ebp - 0x1a70], esi
call fcn.00504c70
add esp, 0x14
mov eax, esi
sub eax, edi
push eax
push edi
lea eax, [ebp - 0x128]
push 0x80
push eax
call fcn.0050d9cf
lea eax, [ebp - 0x128]
push 0x3a
push eax
call fcn.005041c0
mov ecx, eax
mov dword [ebp - 0x18], 0
add esp, 0x18
xorps xmm0, xmm0
movups xmmword [ebp - 0x28], xmm0
test ecx, ecx
je 0x4745e5
lea edx, [ebp - 0x128]
sub eax, edx
cmp eax, 0x80
jae 0x474a76
lea eax, [ecx + 1]
mov byte [ecx], 0
push eax
lea eax, [ebp - 0x28]
push 0x14
push eax
call fcn.0050d9da
add esp, 0xc
lea eax, [ebp - 0x28]
push eax
call fcn.0050ed72
add esp, 4
mov esi, eax
jmp 0x4745eb
mov esi, dword [ebp - 0x1a64]
mov dword [ebp - 0x2c], 0
xorps xmm0, xmm0
movups xmmword [ebp - 0x3c], xmm0
cmp esi, 0x50
je 0x47461a
lea eax, [esi - 1]
cmp eax, 0xfffe
ja 0x47461a
push esi
lea eax, [ebp - 0x3c]
push 0x564914
push eax
call fcn.00474a80
add esp, 0xc
push 6
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
push 4
mov edi, eax
mov dword [ebp - 0x1a34], 0x2710
lea eax, [ebp - 0x1a34]
push eax
push 0x1005
push 0xffff
push edi
call dword [sym.imp.WS2_32.dll_setsockopt]
lea eax, [ebp - 0x128]
xorps xmm0, xmm0
push eax
movups xmmword [ebp - 0x1a5c], xmm0
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
je 0x474680
movsx ecx, word [eax + 0xa]
mov eax, dword [eax + 0xc]
push ecx
push dword [eax]
lea eax, [ebp - 0x1a58]
push eax
call fcn.00504dd0
add esp, 0xc
mov eax, 2
push esi
mov word [ebp - 0x1a5c], ax
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x1a5a], ax
lea eax, [ebp - 0x1a5c]
push 0x10
push eax
push edi
call dword [sym.imp.WS2_32.dll_connect]
push 0x400
lea eax, [ebp - 0xa30]
push 0
push eax
call fcn.00504c70
add esp, 0xc
lea eax, [ebp - 0x630]
push 0x400
push 0
push eax
call fcn.00504c70
mov esi, dword [ebp - 0x1a68]
add esp, 0xc
test esi, esi
je 0x47472c
cmp byte [esi], 0
je 0x47472c
push str.referer:
lea eax, [ebp - 0xa30]
push 0x400
push eax
call fcn.0050d9da
add esp, 0xc
lea eax, [ebp - 0xa30]
push esi
push 0x400
push eax
call fcn.0050931c
add esp, 0xc
lea eax, [ebp - 0xa30]
push 0x560598
push 0x400
push eax
call fcn.0050931c
add esp, 0xc
mov esi, dword [ebp - 0x1a6c]
test esi, esi
je 0x474782
cmp byte [esi], 0
je 0x474782
push str.Cookie:
lea eax, [ebp - 0x630]
push 0x400
push eax
call fcn.0050d9da
add esp, 0xc
lea eax, [ebp - 0x630]
push esi
push 0x400
push eax
call fcn.0050931c
add esp, 0xc
lea eax, [ebp - 0x630]
push 0x560598
push 0x400
push eax
call fcn.0050931c
add esp, 0xc
push 0x800
lea eax, [ebp - 0x1a30]
push 0
push eax
call fcn.00504c70
add esp, 0xc
lea eax, [ebp - 0x630]
push eax
lea eax, [ebp - 0xa30]
push eax
lea eax, [ebp - 0x3c]
push eax
lea eax, [ebp - 0x128]
push eax
push dword [ebp - 0x1a70]
lea eax, [ebp - 0x1a30]
push str.GET__s_HTTP_1.1_r_nHost:__s_s_r_nAccept:__r_nUser_Agent:_Mozilla_5.0__compatible__MSIE_9.0__Windows_NT_6.1__WOW64__Trident_5.0__r_nConnection:close_r_nCache_Control:_no_cache_r_n_s_s_r_n
push eax
call fcn.00474aa0
lea ecx, [ebp - 0x1a30]
add esp, 0x1c
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4747d4
push 0
sub ecx, edx
lea eax, [ebp - 0x1a30]
push ecx
push eax
push edi
call dword [sym.imp.WS2_32.dll_send]
push 0x800
lea eax, [ebp - 0x1230]
push 0
push eax
call fcn.00504c70
add esp, 0xc
lea eax, [ebp - 0x1230]
push 0
push 0x7ff
push eax
push edi
call dword [sym.imp.WS2_32.dll_recv]
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
push 0x105
lea eax, [ebp - 0x230]
push 0
push eax
call fcn.00504c70
add esp, 0xc
lea eax, [ebp - 0x1230]
push str.HTTP_1.1
push eax
call fcn.005046b0
add esp, 8
test eax, eax
jne 0x474866
lea eax, [ebp - 0x1230]
push str.HTTP_1.0
push eax
call fcn.005046b0
add esp, 8
test eax, eax
je 0x4748b1
push 4
add eax, 9
push eax
lea eax, [ebp - 0x230]
push 0x105
push eax
call fcn.0050d9cf
lea eax, [ebp - 0x230]
push eax
call fcn.0050ed72
mov ecx, eax
add esp, 0x14
sub ecx, 0xc8
je 0x4748b1
sub ecx, 0x66
je 0x474967
cmp eax, 0xffffffff
je 0x474a42
cmp eax, 0xfffffffe
je 0x4744c0
push 0x64
lea eax, [ebp - 0xa8]
push 0
push eax
call fcn.00504c70
add esp, 0xc
lea eax, [ebp - 0x1230]
push str.Content_Length:
push eax
call fcn.005046b0
add esp, 8
test eax, eax
je 0x474a01
mov cl, byte [eax + 0xf]
add eax, 0xf
test cl, cl
je 0x474a17
cmp cl, 0xd
je 0x47490f
lea edx, [ebp - 0xa8]
nop dword [eax]
mov byte [edx], cl
lea eax, [eax + 1]
mov cl, byte [eax]
lea edx, [edx + 1]
cmp cl, 0xd
jne 0x474900
lea ecx, [ebp - 0xa8]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x474918
sub ecx, edx
xor eax, eax
xor edx, edx
mov dword [ebp - 0x1a64], ecx
test ecx, ecx
jle 0x47495a
nop
cmp byte [ebp + eax - 0xa8], 0x20
mov ecx, dword [ebp - 0x1a64]
je 0x474955
mov cl, byte [ebp + eax - 0xa8]
mov byte [ebp + edx - 0xa8], cl
inc edx
mov ecx, dword [ebp - 0x1a64]
inc eax
cmp eax, ecx
jl 0x474930
mov byte [ebp + edx - 0xa8], 0
jmp 0x474a17
push 0x105
lea eax, [ebp - 0x230]
push 0
push eax
call fcn.00504c70
add esp, 0xc
lea eax, [ebp - 0x1230]
push str.Location
push eax
call fcn.005046b0
mov esi, eax
add esp, 8
test esi, esi
je 0x4748b1
push 0x560598
push esi
call fcn.005046b0
sub eax, esi
add esp, 8
lea ecx, [eax - 1]
cmp ecx, 0x102
ja 0x4748b1
add eax, 0xfffffff6
push eax
lea eax, [esi + 0xa]
push eax
lea eax, [ebp - 0x230]
push 0x105
push eax
call fcn.0050d9cf
lea ecx, [ebp - 0x230]
add esp, 0x10
lea edx, [ecx + 1]
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4749e0
sub ecx, edx
lea eax, [ebp - 0x230]
push ecx
push eax
lea ecx, [ebp - 0x1a4c]
call fcn.0040ad60
jmp 0x4744c0
push 0x564760
lea eax, [ebp - 0xa8]
push 0x64
push eax
call fcn.0050d9da
add esp, 0xc
lea eax, [ebp - 0xa8]
push eax
call fcn.0050ecc1
add esp, 4
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x1a4c]
mov esi, eax
mov edi, edx
call fcn.004081f0
mov eax, esi
mov edx, edi
jmp 0x474a58
lea ecx, [ebp - 0x1a4c]
mov dword [ebp - 4], 0xffffffff
call fcn.004081f0
xor eax, eax
xor edx, edx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.00501e95
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret
call fcn.005025c2
int3