Function at 0x405edb
Capabilities:
Act as tcp client
Check http status code
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
Resolve function by parsing pe exports
Send data
Send data on socket
Send http request
Send http request with host header
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x1544
call fcn.004be980
mov eax, dword [0x513720]
xor eax, esp
mov dword [esp + 0x1540], eax
mov eax, dword [ebp + 8]
push ebx
push esi
mov esi, ecx
mov dword [esp + 0xc], edx
mov dword [esp + 0x10], eax
push edi
test esi, esi
je 0x40634c
cmp byte [esi], 0
je 0x40634c
xor ebx, ebx
push 0x7f
lea eax, [esp + 0x65]
mov byte [esp + 0x64], bl
push ebx
push eax
call fcn.004be330
push 0x50
pop ebx
push 0x4fe80c
push esi
call fcn.004baf70
mov edi, eax
add esp, 0x14
test edi, edi
jne 0x405f51
mov eax, esi
neg eax
cmp eax, 0x13
jg 0x40634c
mov eax, edi
sub eax, esi
push eax
push esi
lea eax, [esp + 0x68]
push 0x80
push eax
call fcn.004bb5cc
lea eax, [esp + 0x70]
add edi, 3
push str.http
push eax
call fcn.004bae8d
add esp, 0x18
test eax, eax
jne 0x40634c
push 0x2f
push edi
call fcn.004bb1e0
push 0x80
mov dword [esp + 0x18], eax
lea eax, [esp + 0x6c]
push 0
push eax
call fcn.004be330
mov eax, dword [esp + 0x20]
sub eax, edi
push eax
push edi
lea eax, [esp + 0x7c]
push 0x80
push eax
call fcn.004bb5cc
lea eax, [esp + 0x84]
push 0x3a
push eax
call fcn.004bb1e0
mov ecx, eax
mov byte [esp + 0x64], 0
xor eax, eax
lea edi, [esp + 0x65]
stosd dword es:[edi], eax
add esp, 0x2c
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
test ecx, ecx
je 0x406018
mov eax, ecx
lea edx, [esp + 0x60]
sub eax, edx
cmp eax, 0x80
jae 0x406363
mov byte [esp + eax + 0x60], 0
lea eax, [ecx + 1]
push eax
lea eax, [esp + 0x3c]
push 0x14
push eax
call fcn.004bb363
lea eax, [esp + 0x44]
push eax
call fcn.004bb30b
add esp, 0x10
mov ebx, eax
xor eax, eax
mov byte [esp + 0x4c], 0
lea edi, [esp + 0x4d]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
cmp ebx, 0x50
je 0x40604c
lea eax, [ebx - 1]
cmp eax, 0xfffe
ja 0x40604c
push ebx
lea eax, [esp + 0x50]
push 0x4fe818
push eax
call fcn.00406369
add esp, 0xc
push 6
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
push 4
mov edi, eax
mov dword [esp + 0x1c], 0x2710
lea eax, [esp + 0x1c]
push eax
push 0x1005
push 0xffff
push edi
call dword [sym.imp.WS2_32.dll_setsockopt]
lea eax, [esp + 0x60]
xorps xmm0, xmm0
push eax
movdqu xmmword [esp + 0x20], xmm0
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
je 0x4060a9
movsx ecx, word [eax + 0xa]
mov eax, dword [eax + 0xc]
push ecx
push dword [eax]
lea eax, [esp + 0x28]
push eax
call fcn.004bdce0
add esp, 0xc
push 2
pop eax
push ebx
mov word [esp + 0x20], ax
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0x1e], ax
lea eax, [esp + 0x1c]
push 0x10
push eax
push edi
call dword [sym.imp.WS2_32.dll_connect]
xor ebx, ebx
lea eax, [esp + 0x949]
push 0x3ff
push ebx
push eax
mov byte [esp + 0x954], bl
call fcn.004be330
push 0x3ff
lea eax, [esp + 0x159]
mov byte [esp + 0x158], bl
push ebx
push eax
call fcn.004be330
mov ebx, dword [esp + 0x28]
add esp, 0x18
test ebx, ebx
je 0x406152
cmp byte [ebx], 0
je 0x406152
push str.referer:
lea eax, [esp + 0x94c]
push 0x400
push eax
call fcn.004bb363
push ebx
mov ebx, 0x400
lea eax, [esp + 0x958]
push ebx
push eax
call fcn.004bab23
push 0x4fe738
lea eax, [esp + 0x964]
push ebx
push eax
call fcn.004bab23
add esp, 0x24
mov ebx, dword [esp + 0x14]
test ebx, ebx
je 0x40619b
push str.Cookie:
lea eax, [esp + 0x14c]
push 0x400
push eax
call fcn.004bb363
push ebx
mov ebx, 0x400
lea eax, [esp + 0x158]
push ebx
push eax
call fcn.004bab23
push 0x4fe738
lea eax, [esp + 0x164]
push ebx
push eax
call fcn.004bab23
add esp, 0x24
xor ebx, ebx
lea eax, [esp + 0xd49]
push 0x7ff
push ebx
push eax
mov byte [esp + 0xd54], bl
call fcn.004be330
lea eax, [esp + 0x154]
push eax
lea eax, [esp + 0x958]
push eax
lea eax, [esp + 0x60]
push eax
lea eax, [esp + 0x78]
push eax
push dword [esp + 0x28]
lea eax, [esp + 0xd68]
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.00406383
lea ecx, [esp + 0xd70]
add esp, 0x28
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4061f4
push ebx
sub ecx, edx
lea eax, [esp + 0xd4c]
push ecx
push eax
push edi
call dword [sym.imp.WS2_32.dll_send]
push 0x3ff
lea eax, [esp + 0x54d]
mov byte [esp + 0x54c], bl
push ebx
push eax
call fcn.004be330
add esp, 0xc
lea eax, [esp + 0x548]
push ebx
push 0x3ff
push eax
push edi
call dword [sym.imp.WS2_32.dll_recv]
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
xor eax, eax
mov byte [esp + 0x2c], bl
lea edi, [esp + 0x2d]
stosd dword es:[edi], eax
push str.HTTP_1.1
stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [esp + 0x54c]
push eax
call fcn.004baf70
pop ecx
pop ecx
test eax, eax
jne 0x406286
lea eax, [esp + 0x548]
push str.HTTP_1.0
push eax
call fcn.004baf70
pop ecx
pop ecx
test eax, eax
je 0x4062c1
push 4
add eax, 9
push eax
lea eax, [esp + 0x34]
push 0xc
push eax
call fcn.004bb5cc
lea eax, [esp + 0x3c]
push eax
call fcn.004bb30b
xor ecx, ecx
add esp, 0x14
cmp eax, 0xc8
cmovne ecx, eax
cmp ecx, 0xffffffff
je 0x40634c
cmp ecx, 0xfffffffe
je 0x405f1c
push 0x63
lea eax, [esp + 0xe5]
mov byte [esp + 0xe4], bl
push ebx
push eax
call fcn.004be330
lea eax, [esp + 0x554]
push str.Content_Length:
push eax
call fcn.004baf70
add esp, 0x14
test eax, eax
je 0x406325
add eax, 0xf
mov cl, byte [eax]
test cl, cl
je 0x40633c
cmp cl, 0xd
je 0x406311
lea edx, [esp + 0xe0]
mov byte [edx], cl
inc edx
inc eax
mov cl, byte [eax]
cmp cl, 0xd
jne 0x406306
lea eax, [esp + 0xe0]
mov dl, 0x20
push eax
mov ecx, eax
call fcn.00422870
pop ecx
jmp 0x40633c
push 0x4fe8f0
lea eax, [esp + 0xe4]
push 0x64
push eax
call fcn.004bb363
add esp, 0xc
lea eax, [esp + 0xe0]
push eax
call fcn.004bb30b
pop ecx
jmp 0x40634e
xor eax, eax
mov ecx, dword [esp + 0x154c]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.004b923d
mov esp, ebp
pop ebp
ret
call fcn.004bb4f0
int3