Function at 0x404620
Capabilities:
Receive data
Receive data on socket
Reference http user-agent string
Send data
Send data on socket
Send http request
Send http request with host header
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x41998f
mov eax, dword fs:[0]
push eax
sub esp, 0xd08
mov eax, dword [0x41f3c4]
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 dword [ebp - 0xd0c], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0xd10], ecx
mov dword [ebp - 0xd08], eax
xor ebx, ebx
mov dword [ebp - 4], ebx
cmp eax, ebx
jne 0x40468b
cmp dword [ebp + 0x24], 0x10
jb 0x404681
mov edx, dword [ebp + 0x10]
push edx
call fcn.0040a55f
add esp, 4
mov eax, 3
jmp 0x404dfa
push ebx
mov esi, 0xf
push 0x41c84c
lea ecx, [ebp - 0xc90]
mov dword [ebp - 0xc7c], esi
mov dword [ebp - 0xc80], ebx
mov byte [ebp - 0xc90], bl
call fcn.00403b60
mov byte [ebp - 4], 1
push ebx
push 0x41c84c
lea ecx, [ebp - 0xcac]
mov dword [ebp - 0xc98], esi
mov dword [ebp - 0xc9c], ebx
mov byte [ebp - 0xcac], 0
call fcn.00403b60
lea eax, [ebp - 0xcac]
push eax
lea ecx, [ebp - 0xc90]
push ecx
sub esp, 0x1c
mov ecx, esp
mov dword [ebp - 0xd14], esp
push 0xffffffffffffffff
mov byte [ebp - 4], 2
push ebx
lea edx, [ebp + 0x10]
mov dword [ecx + 0x14], 0xf
mov dword [ecx + 0x10], ebx
push edx
mov dword [ebp - 0xd04], 0xffffffff
lea esi, [ebp - 0xd04]
lea edi, [ebp + 0x2c]
mov byte [ecx], 0
call fcn.004037a0
mov edx, esi
mov ecx, edi
call fcn.00403dc0
add esp, 0x24
cmp eax, ebx
jne 0x4047ad
mov esi, 0x10
cmp dword [ebp - 0xc98], esi
jb 0x404750
mov eax, dword [ebp - 0xcac]
push eax
call fcn.0040a55f
add esp, 4
mov edi, 0xf
mov dword [ebp - 0xc98], edi
mov dword [ebp - 0xc9c], ebx
mov byte [ebp - 0xcac], 0
cmp dword [ebp - 0xc7c], esi
jb 0x40477f
mov ecx, dword [ebp - 0xc90]
push ecx
call fcn.0040a55f
add esp, 4
mov dword [ebp - 0xc7c], edi
mov dword [ebp - 0xc80], ebx
mov byte [ebp - 0xc90], 0
cmp dword [ebp + 0x24], esi
jb 0x4047a3
mov edx, dword [ebp + 0x10]
push edx
call fcn.0040a55f
add esp, 4
mov eax, 1
jmp 0x404dfa
push 0x7ff
lea eax, [ebp - 0x873]
push ebx
push eax
mov byte [ebp - 0x874], 0
call fcn.00412870
lea eax, [ebp - 0x874]
add esp, 0xc
dec eax
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x4047d0
cmp dword [ebp - 0xc98], 0x10
mov ecx, dword [str.POST]
mov dx, word [0x41cb50]
mov dword [eax], ecx
mov word [eax + 4], dx
mov eax, dword [ebp - 0xcac]
jae 0x404800
lea eax, [ebp - 0xcac]
mov edx, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x404802
lea edi, [ebp - 0x874]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x404812
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
lea eax, [ebp - 0x874]
rep movsb byte es:[edi], byte [esi]
dec eax
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x404831
mov ecx, dword [str._HTTP_1.1_r_n]
mov edx, dword [0x41cb58]
mov dword [eax], ecx
mov ecx, dword [0x41cb5c]
mov dword [eax + 4], edx
mov dword [eax + 8], ecx
lea eax, [ebp - 0x874]
dec eax
lea ebx, [ebx]
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x404860
cmp dword [ebp - 0xc7c], 0x10
mov edx, dword [str.Host:]
mov cx, word [0x41cb64]
mov dword [eax], edx
mov dl, byte [0x41cb66]
mov word [eax + 4], cx
mov byte [eax + 6], dl
mov eax, dword [ebp - 0xc90]
jae 0x404899
lea eax, [ebp - 0xc90]
mov edx, eax
jmp 0x4048a0
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4048a0
lea edi, [ebp - 0x874]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x4048b0
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
lea eax, [ebp - 0x874]
rep movsb byte es:[edi], byte [esi]
dec eax
nop
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x4048d0
mov cx, word [0x41cb68]
mov dl, byte [0x41cb6a]
lea edi, [ebp - 0x874]
mov word [eax], cx
mov byte [eax + 2], dl
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x4048f2
mov eax, dword [ebp - 0xd08]
mov ecx, 6
mov esi, str.Connection:_keep_alive_r_n
rep movsd dword es:[edi], dword [esi]
movsb byte es:[edi], byte [esi]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x404910
sub eax, edx
push eax
lea eax, [ebp - 0x74]
push str.Content_Length:__d_r_n
push eax
call fcn.0040a4db
lea eax, [ebp - 0x74]
add esp, 0xc
mov ecx, eax
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x404930
lea edi, [ebp - 0x874]
sub eax, ecx
mov esi, ecx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x404942
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [ebp - 0x874]
dec edi
nop
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x404960
mov ecx, 6
mov esi, str.Cache_Control:_max_age0_r_n
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
lea edi, [ebp - 0x874]
dec edi
mov edi, edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x404980
mov ecx, 7
mov esi, str.Origin:_http:__www.baidu.com_r_n
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
lea edi, [ebp - 0x874]
dec edi
mov edi, edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x4049a0
mov ecx, 0x1c
mov esi, str.User_Agent:_Mozilla_5.0__Windows_NT_6.1__AppleWebKit_535.1__KHTML__like_Gecko__Chrome_15.0.849.0_Safari_535.1_r_n
rep movsd dword es:[edi], dword [esi]
lea edi, [ebp - 0x874]
dec edi
jmp 0x4049c0
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x4049c0
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]
lea edi, [ebp - 0x874]
dec edi
lea ecx, [ecx]
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x4049e0
mov ecx, 0x12
mov esi, str.Accept:_text_html_application_xhtmlxml_application_xml_q0.9___q0.8_r_n
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
lea edi, [ebp - 0x874]
dec edi
lea ecx, [ecx]
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x404a00
mov ecx, 8
mov esi, str.Referer:_http:__www.baidu.com_r_n
rep movsd dword es:[edi], dword [esi]
lea edi, [ebp - 0x874]
dec edi
jmp 0x404a20
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x404a20
mov ecx, 8
mov esi, str.Accept_Encoding:_deflate_sdch_r_n
rep movsd dword es:[edi], dword [esi]
lea edi, [ebp - 0x874]
dec edi
jmp 0x404a40
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x404a40
mov ecx, 8
mov esi, str.Accept_Language:_zh_CN_zh_q0.8_r_n
rep movsd dword es:[edi], dword [esi]
lea eax, [ebp - 0x874]
movsw word es:[edi], word [esi]
dec eax
lea ecx, [ecx]
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x404a60
mov cx, word [0x41cb68]
mov dl, byte [0x41cb6a]
mov word [eax], cx
mov byte [eax + 2], dl
lea eax, [ebp - 0x874]
mov dword [ebp - 0xcd0], 0xf
mov dword [ebp - 0xcd4], ebx
mov byte [ebp - 0xce4], 0
lea edx, [eax + 1]
jmp 0x404aa0
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x404aa0
sub eax, edx
push eax
lea eax, [ebp - 0x874]
push eax
lea ecx, [ebp - 0xce4]
call fcn.00403b60
mov esi, dword [ebp - 0xd08]
mov eax, esi
mov byte [ebp - 4], 3
lea edx, [eax + 1]
jmp 0x404ad0
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x404ad0
sub eax, edx
push eax
mov eax, esi
lea ecx, [ebp - 0xce4]
call fcn.00402900
mov eax, dword [ebp - 0xce4]
mov edi, 0x10
cmp dword [ebp - 0xcd0], edi
jae 0x404b00
lea eax, [ebp - 0xce4]
mov ecx, dword [ebp - 0xcd4]
mov esi, dword [ebp - 0xd04]
push ebx
push ecx
push eax
push esi
call dword [sym.imp.WS2_32.dll_send]
cmp eax, 0xffffffff
jne 0x404bbd
cmp dword [ebp - 0xcd0], edi
jb 0x404b36
mov edx, dword [ebp - 0xce4]
push edx
call fcn.0040a55f
add esp, 4
mov esi, 0xf
mov dword [ebp - 0xcd0], esi
mov dword [ebp - 0xcd4], ebx
mov byte [ebp - 0xce4], 0
cmp dword [ebp - 0xc98], edi
jb 0x404b65
mov eax, dword [ebp - 0xcac]
push eax
call fcn.0040a55f
add esp, 4
mov dword [ebp - 0xc98], esi
mov dword [ebp - 0xc9c], ebx
mov byte [ebp - 0xcac], 0
cmp dword [ebp - 0xc7c], edi
jb 0x404b8f
mov ecx, dword [ebp - 0xc90]
push ecx
call fcn.0040a55f
add esp, 4
mov dword [ebp - 0xc7c], esi
mov dword [ebp - 0xc80], ebx
mov byte [ebp - 0xc90], 0
cmp dword [ebp + 0x24], edi
jb 0x404bb3
mov edx, dword [ebp + 0x10]
push edx
call fcn.0040a55f
add esp, 4
mov eax, 2
jmp 0x404dfa
mov dword [ebp - 0xcb4], 0xf
mov dword [ebp - 0xcb8], ebx
mov byte [ebp - 0xcc8], 0
push 0x3ff
lea eax, [ebp - 0xc73]
push ebx
mov byte [ebp - 4], 4
push eax
mov byte [ebp - 0xc74], 0
call fcn.00412870
add esp, 0xc
push ebx
push 0x3ff
lea ecx, [ebp - 0xc74]
push ecx
push esi
call dword [sym.imp.WS2_32.dll_recv]
cmp eax, ebx
jle 0x404c9b
mov edi, dword [sym.imp.WS2_32.dll_setsockopt]
mov ebx, 0x3e8
jmp 0x404c20
lea eax, [ebp - 0xc74]
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x404c30
sub eax, edx
push eax
lea eax, [ebp - 0xc74]
lea ecx, [ebp - 0xcc8]
call fcn.00402900
push 0x400
lea edx, [ebp - 0xc74]
push 0
push edx
call fcn.00412870
add esp, 0xc
push 4
lea eax, [ebp - 0xd04]
push eax
push 0x1006
push 0xffff
push esi
mov dword [ebp - 0xd04], ebx
call edi
test eax, eax
jne 0x404c99
push eax
push 0x3ff
lea ecx, [ebp - 0xc74]
push ecx
push esi
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
jg 0x404c20
xor ebx, ebx
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
cmp dword [ebp - 0xcb8], 0xc
jae 0x404ce9
lea ecx, [ebp - 0xcc8]
call fcn.004036e0
lea ecx, [ebp - 0xce4]
call fcn.004036e0
lea ecx, [ebp - 0xcac]
call fcn.004036e0
lea ecx, [ebp - 0xc90]
call fcn.004036e0
lea ecx, [ebp + 0x10]
call fcn.004036e0
mov eax, 3
jmp 0x404dfa
cmp dword [ebp - 0xcb4], 0x10
mov eax, dword [ebp - 0xcc8]
jae 0x404cfe
lea eax, [ebp - 0xcc8]
call fcn.00404e20
cmp eax, 0xc8
jne 0x404cab
lea edx, [ebp - 0xcc8]
push edx
mov edx, str._r_n_r_n
call fcn.00402670
cmp eax, 0xffffffff
je 0x404cab
mov ecx, dword [ebp - 0xcb8]
add ecx, 0xfffffffc
push ecx
lea ecx, [eax + 4]
lea esi, [ebp - 0xd00]
lea edx, [ebp - 0xcc8]
call fcn.004026a0
mov edi, eax
lea esi, [ebp - 0xcc8]
mov byte [ebp - 4], 5
call fcn.00403670
lea ecx, [ebp - 0xd00]
mov byte [ebp - 4], 4
call fcn.004036e0
mov eax, dword [ebp - 0xcb8]
mov edx, dword [ebp - 0xd10]
mov dword [edx], eax
inc eax
push eax
call fcn.0040a215
mov ecx, dword [ebp - 0xd0c]
add esp, 4
mov dword [ecx], eax
cmp eax, ebx
je 0x404cab
mov esi, dword [ebp - 0xd10]
mov edx, dword [esi]
inc edx
push edx
push ebx
push eax
call fcn.00412870
mov eax, dword [ebp - 0xcc8]
add esp, 0xc
cmp dword [ebp - 0xcb4], 0x10
jae 0x404daf
lea eax, [ebp - 0xcc8]
mov ecx, dword [esi]
mov edx, dword [ebp - 0xd0c]
push ecx
push eax
mov eax, dword [edx]
push eax
call fcn.0040bbf0
add esp, 0xc
lea ecx, [ebp - 0xcc8]
call fcn.004036e0
lea ecx, [ebp - 0xce4]
call fcn.004036e0
lea ecx, [ebp - 0xcac]
call fcn.004036e0
lea ecx, [ebp - 0xc90]
call fcn.004036e0
lea ecx, [ebp + 0x10]
call fcn.004036e0
xor eax, eax
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.0040a4cc
mov esp, ebp
pop ebp
ret