Function at 0x409660
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
Initialize winsock library
Receive data
Receive data on socket
Resolve dns
Send data
Send data on socket
Send http request
Send http request with host header

Disassembly:
push 0xffffffffffffffff
push 0x447266
mov eax, dword fs:[0]
push eax
sub esp, 0x7e0
mov eax, dword [0x45d594]
xor eax, esp
mov dword [esp + 0x7d8], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x45d594]
xor eax, esp
push eax
lea eax, [esp + 0x7f4]
mov dword fs:[0], eax
mov ebp, dword [esp + 0x80c]
mov eax, dword [esp + 0x804]
mov edi, dword [esp + 0x808]
push 0x200
mov esi, edx
lea edx, [esp + 0x5f0]
push 0
push edx
mov dword [esp + 0x50], eax
mov dword [esp + 0x30], edi
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x40], 0x50
call fcn.00432d30
push 0x400
lea eax, [esp + 0x1fc]
push 0
push eax
call fcn.00432d30
xor eax, eax
add esp, 0x18
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], eax
call fcn.00412446
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x409719
push 0x80004005
call fcn.00403990
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x1c], eax
mov dword [esp + 0x7fc], 0
call fcn.00412446
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x40974e
push 0x80004005
call fcn.00403990
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x20], eax
lea ecx, [esp + 0x34]
push ecx
lea edx, [esp + 0x24]
push edx
lea eax, [esp + 0x24]
push eax
lea ecx, [esp + 0x54]
push ecx
mov byte [esp + 0x80c], 1
push esi
mov dword [esp + 0x5c], 3
call fcn.0041efce
lea edx, [esp + 0x5c]
push edx
push 0x101
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x4097f9
mov byte [esp + 0x7fc], 0
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4097c4
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0x7fc], 0xffffffff
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4097ef
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, 1
jmp 0x409da1
push 6
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov esi, eax
or ebx, 0xffffffff
mov dword [esp + 0x2c], esi
cmp esi, ebx
jne 0x409853
mov byte [esp + 0x7fc], 0
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
mov edx, ebx
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x409839
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0x7fc], ebx
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
lock xadd dword [ecx], ebx
dec ebx
test ebx, ebx
jmp 0x4097e3
mov edx, dword [esp + 0x34]
mov ecx, 2
push edx
mov word [esp + 0x50], cx
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0x4e], ax
mov eax, dword [esp + 0x1c]
push eax
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
je 0x409883
mov ecx, dword [eax + 0xc]
mov eax, dword [ecx]
mov eax, dword [eax]
push 0x10
lea edx, [esp + 0x50]
push edx
push esi
mov dword [esp + 0x5c], eax
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, ebx
jne 0x4098aa
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
jne 0x409812
lea eax, [esp + 0x1ec]
add eax, ebx
test edi, edi
jne 0x4098d2
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x4098b7
mov ecx, dword [str.GET]
mov dl, byte [0x450914]
mov dword [eax], ecx
mov byte [eax + 4], dl
jmp 0x4098ed
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x4098d2
mov ecx, dword [str.POST]
mov dx, word [0x45090c]
mov dword [eax], ecx
mov word [eax + 4], dx
mov eax, dword [esp + 0x20]
mov edx, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4098f3
lea edi, [esp + 0x1ec]
sub eax, edx
add edi, ebx
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x409905
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
lea eax, [esp + 0x1ec]
rep movsb byte es:[edi], byte [esi]
add eax, ebx
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x409926
mov ecx, dword [str._HTTP_1.0__r_n]
mov edx, dword [0x450a0c]
mov dword [eax], ecx
mov ecx, dword [0x450a10]
mov dword [eax + 4], edx
mov dl, byte [0x450a14]
lea edi, [esp + 0x1ec]
mov dword [eax + 8], ecx
mov byte [eax + 0xc], dl
add edi, ebx
lea ebx, [ebx]
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x409960
mov ecx, 0x22
mov esi, str.Accept:_image_gif_image_x_xbitmap_image_jpeg_image_pjpeg_application_vnd.ms_excel_application_msword_application_vnd.ms_powerpoint___r_n
rep movsd dword es:[edi], dword [esi]
movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x1ec]
add edi, ebx
mov edi, edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x409980
mov ecx, 6
mov esi, str.Accept_Language:_zh_cn_r_n
rep movsd dword es:[edi], dword [esi]
movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x1ec]
add edi, ebx
mov edi, edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x4099a0
mov ecx, 8
mov esi, str.Accept_Encoding:_gzip_deflate_r_n
rep movsd dword es:[edi], dword [esi]
lea edi, [esp + 0x1ec]
add edi, ebx
lea ecx, [ecx]
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x4099c0
mov ecx, 0x10
mov esi, str.User_Agent:_Mozilla_4.0__compatible__MSIE_8.0__Windows_NT_5.1__r_n
rep movsd dword es:[edi], dword [esi]
movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x1ec]
add edi, ebx
mov edi, edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x4099e0
mov ecx, 0xc
mov esi, str.Content_Type:_application_x_www_form_urlencoded_r_n
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
test ebp, ebp
jbe 0x409a4a
push ebp
lea eax, [esp + 0x5f0]
push str.Content_Length:__ld_r_n
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
lea eax, [esp + 0x5f8]
add esp, 0xc
mov edx, eax
lea ebx, [ebx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x409a20
lea edi, [esp + 0x1ec]
sub eax, edx
add edi, ebx
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x409a32
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea eax, [esp + 0x1ec]
add eax, ebx
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x409a53
mov ecx, dword [str.Host:]
mov dx, word [0x450b30]
mov dword [eax], ecx
mov cl, byte [0x450b32]
mov word [eax + 4], dx
mov byte [eax + 6], cl
mov eax, dword [esp + 0x1c]
mov edx, eax
lea ecx, [ecx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x409a80
lea edi, [esp + 0x1ec]
sub eax, edx
add edi, ebx
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x409a92
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
lea eax, [esp + 0x1ec]
rep movsb byte es:[edi], byte [esi]
add eax, ebx
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x409ab3
mov bp, word [0x450924]
mov bl, byte [0x450926]
mov word [eax], bp
mov byte [eax + 2], bl
mov eax, dword [esp + 0x44]
test eax, eax
je 0x409b1f
cmp byte [eax], cl
je 0x409b1f
mov edx, eax
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x409ae0
lea edi, [esp + 0x1ec]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x409af1
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
lea eax, [esp + 0x1ec]
rep movsb byte es:[edi], byte [esi]
dec eax
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x409b11
mov word [eax], bp
mov byte [eax + 2], bl
lea eax, [esp + 0x1ec]
dec eax
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x409b27
cmp dword [esp + 0x24], 0
mov word [eax], bp
mov byte [eax + 2], bl
je 0x409b79
cmp dword [esp + 0x80c], 0
jbe 0x409b79
mov eax, dword [esp + 0x24]
mov edx, eax
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x409b50
lea edi, [esp + 0x1ec]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x409b61
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea eax, [esp + 0x1ec]
xor esi, esi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x409b85
mov ebp, dword [sym.imp.WS2_32.dll_send]
sub eax, edx
mov ebx, eax
mov ecx, dword [esp + 0x2c]
push 0
mov edx, ebx
sub edx, esi
push edx
lea eax, [esp + esi + 0x1f4]
push eax
push ecx
call ebp
mov edi, eax
cmp edi, 0xffffffff
jne 0x409bc4
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
jne 0x409c65
add esi, edi
cmp esi, ebx
jb 0x409b96
lea eax, [esp + 0x1ec]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x409bd4
sub eax, edx
lea ecx, [eax*4]
push ecx
call fcn.004309a6
mov edx, dword [esp + 0x34]
mov dword [edx], eax
add esp, 4
lea ecx, [esp + 0x1ec]
mov edx, eax
lea esp, [esp]
mov al, byte [ecx]
mov byte [edx], al
inc ecx
inc edx
test al, al
jne 0x409c00
mov ebp, 0xa
push ebp
call fcn.004309a6
mov ebx, eax
add esp, 4
mov edi, ebx
mov dword [esp + 0x24], 0
mov byte [esp + 0x1b], 0
lea esp, [esp]
mov ecx, dword [esp + 0x2c]
push 0
push 1
lea eax, [esp + 0x5f4]
push eax
push ecx
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
jge 0x409c50
mov byte [esp + 0x1b], 1
mov al, byte [esp + 0x5ec]
cmp al, 0xa
je 0x409c86
cmp al, 0xd
je 0x409c9a
inc dword [esp + 0x24]
jmp 0x409c9a
mov byte [esp + 0x7fc], 0
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jmp 0x4097b8
cmp dword [esp + 0x24], 0
jne 0x409c92
mov byte [esp + 0x1b], 1
mov dword [esp + 0x24], 0
mov esi, edi
sub esi, ebx
mov byte [esp + 0x28], al
cmp esi, ebp
jb 0x409cb7
add ebp, ebp
push ebp
push ebx
call fcn.00430a70
mov ebx, eax
add esp, 8
lea edi, [esi + ebx]
mov dl, byte [esp + 0x28]
mov byte [edi], dl
inc edi
cmp byte [esp + 0x1b], 0
je 0x409c30
mov eax, dword [esp + 0x30]
mov dword [eax + 4], ebx
push 0xa
mov byte [edi], 0
mov dword [esp + 0x44], 0xa
call fcn.004309a6
mov ebp, dword [esp + 0x30]
add esp, 4
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], eax
push 0
push 0x1ff
lea ecx, [esp + 0x5f4]
push ecx
push ebp
call dword [sym.imp.WS2_32.dll_recv]
mov edi, eax
test edi, edi
jl 0x409d2c
lea edx, [esp + 0x5ec]
push edx
mov ebx, edi
lea esi, [esp + 0x3c]
mov byte [esp + edi + 0x5f0], 0
call fcn.00409600
test edi, edi
jg 0x409cf1
mov ecx, dword [esp + 0x3c]
mov eax, dword [esp + 0x38]
mov edx, dword [esp + 0x30]
mov esi, ecx
sub esi, eax
mov dword [edx + 8], eax
mov dword [edx + 0xc], esi
push ebp
mov byte [ecx], 0
call dword [sym.imp.WS2_32.dll_closesocket]
mov byte [esp + 0x7fc], 0
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x409d74
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0x7fc], 0xffffffff
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x409d9f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
mov ecx, dword [esp + 0x7f4]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x7d8]
xor ecx, esp
call fcn.0042f428
add esp, 0x7ec
ret 0xc