Function at 0x402220
Capabilities:
Connect to http server
Create http request
Read data from internet
Receive data
Send data
Send http request

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x52b989
mov eax, dword fs:[0]
push eax
sub esp, 0x34
push ebx
push esi
push edi
mov eax, dword [0x586dc4]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x24], 0
mov dword [ebp - 4], 3
call fcn.0041460c
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x402270
push 0x80004005
call fcn.00401000
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x18], eax
mov byte [ebp - 4], 4
call fcn.0041460c
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x40229d
push 0x80004005
call fcn.00401000
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x28], eax
mov byte [ebp - 4], 5
call fcn.0041460c
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x4022ca
push 0x80004005
call fcn.00401000
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
lea edi, [eax + 0x10]
mov dword [ebp - 0x1c], edi
mov byte [ebp - 4], 6
call fcn.0041460c
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x4022f7
push 0x80004005
call fcn.00401000
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
mov ecx, dword [ebp + 8]
add eax, 0x10
mov dword [ecx], eax
push str.Mozilla_4.0__compatible__MSIE_8.0__Windows_NT_6.1__Trident_4.0_
lea ecx, [ebp - 0x30]
mov dword [ebp - 0x24], 1
call fcn.00401650
push 7
lea edx, [ebp - 0x34]
push edx
lea ecx, [ebp + 0xc]
mov byte [ebp - 4], 7
mov dword [ebp - 0x20], 0x50
mov byte [ebp - 0xd], 0
call fcn.00401d90
mov eax, dword [eax]
push str.http:__
push eax
call fcn.005132e8
add esp, 8
test eax, eax
mov eax, dword [ebp - 0x34]
sete bl
add eax, 0xfffffff0
mov byte [ebp - 4], 7
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x402371
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
test bl, bl
je 0x4023b3
push 7
lea ecx, [ebp - 0x34]
push ecx
lea ecx, [ebp + 0xc]
call fcn.00402170
push eax
lea ecx, [ebp + 0xc]
mov byte [ebp - 4], 9
call fcn.00401f80
mov eax, dword [ebp - 0x34]
add eax, 0xfffffff0
mov byte [ebp - 4], 7
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4023b3
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push 8
lea ecx, [ebp - 0x34]
push ecx
lea ecx, [ebp + 0xc]
call fcn.00401d90
mov eax, dword [eax]
push str.https:__
push eax
call fcn.005132e8
add esp, 8
test eax, eax
mov eax, dword [ebp - 0x34]
sete bl
add eax, 0xfffffff0
mov byte [ebp - 4], 7
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4023f9
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
test bl, bl
je 0x402446
push 8
lea ecx, [ebp - 0x34]
push ecx
lea ecx, [ebp + 0xc]
call fcn.00402170
push eax
lea ecx, [ebp + 0xc]
mov byte [ebp - 4], 0xb
call fcn.00401f80
mov eax, dword [ebp - 0x34]
add eax, 0xfffffff0
mov byte [ebp - 4], 7
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40243b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 0xd], 1
mov dword [ebp - 0x20], 0x1bb
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax - 0xc]
test ecx, ecx
js 0x40246c
push 0x53becc
push eax
call fcn.00513429
add esp, 8
test eax, eax
je 0x40246c
sub eax, dword [ebp + 0xc]
mov esi, eax
cmp esi, 0xffffffff
jne 0x402489
lea ecx, [ebp + 0xc]
push ecx
lea ecx, [ebp - 0x18]
call fcn.00401f80
push 1
push 0x53becc
lea ecx, [ebp - 0x28]
call fcn.004014c0
jmp 0x402503
push esi
lea edx, [ebp - 0x34]
push edx
lea ecx, [ebp + 0xc]
call fcn.00401d90
push eax
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 0xc
call fcn.00401f80
mov eax, dword [ebp - 0x34]
add eax, 0xfffffff0
mov byte [ebp - 4], 7
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4024c6
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push esi
lea ecx, [ebp - 0x34]
push ecx
lea ecx, [ebp + 0xc]
call fcn.00402170
push eax
lea ecx, [ebp - 0x28]
mov byte [ebp - 4], 0xd
call fcn.00401f80
mov eax, dword [ebp - 0x34]
add eax, 0xfffffff0
mov byte [ebp - 4], 7
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x402503
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov esi, dword [ebp - 0x18]
cmp dword [esi - 0xc], 0
jl 0x4025a9
push 0x53bec8
push esi
call fcn.00513429
add esp, 8
test eax, eax
je 0x4025a9
sub eax, esi
mov esi, eax
cmp esi, 0xffffffff
je 0x4025a9
lea ecx, [esi + 1]
push ecx
lea edx, [ebp - 0x34]
push edx
lea ecx, [ebp - 0x18]
call fcn.00402170
mov eax, dword [eax]
push eax
call fcn.00513988
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x34]
add eax, 0xfffffff0
add esp, 4
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40256c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push esi
lea ecx, [ebp - 0x34]
push ecx
lea ecx, [ebp - 0x18]
call fcn.00401d90
push eax
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 0xe
call fcn.00401f80
mov eax, dword [ebp - 0x34]
add eax, 0xfffffff0
mov byte [ebp - 4], 7
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4025a9
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [ebp + 0x10]
cmp dword [ecx - 0xc], 0
jne 0x4025c1
push 3
push 0x53bec4
lea ecx, [ebp + 0x10]
call fcn.004014c0
mov edx, dword [ebp + 0x1c]
test edx, edx
je 0x4025e6
mov eax, edx
lea esi, [eax + 1]
lea ecx, [ecx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4025d0
sub eax, esi
push eax
push edx
lea ecx, [ebp - 0x1c]
call fcn.004014c0
mov edi, dword [ebp - 0x1c]
mov edx, dword [ebp + 0x10]
push str.POST
push edx
call fcn.005132e8
add esp, 8
test eax, eax
jne 0x4026a7
cmp dword [edi - 0xc], eax
jl 0x402621
push str.Content_Type:
push edi
call fcn.00513429
add esp, 8
test eax, eax
je 0x402621
sub eax, edi
cmp eax, 0xffffffff
jne 0x4026a7
mov eax, dword [edi - 0xc]
test eax, eax
je 0x40265a
push 2
lea eax, [ebp - 0x34]
push eax
lea ecx, [ebp - 0x1c]
call fcn.00401d10
mov eax, dword [eax]
push 0x53bea8
push eax
mov dword [ebp - 0x24], 3
call fcn.0051353f
add esp, 8
test eax, eax
setne al
test al, al
je 0x40265a
mov bl, 1
jmp 0x40265c
xor bl, bl
test byte [ebp - 0x24], 2
je 0x402685
mov eax, dword [ebp - 0x34]
and dword [ebp - 0x24], 0xfffffffd
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x402685
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
test bl, bl
je 0x402698
push 2
push 0x53bea8
lea ecx, [ebp - 0x1c]
call fcn.00401ec0
push 0x31
push str.Content_Type:_application_x_www_form_urlencoded_r_n
lea ecx, [ebp - 0x1c]
call fcn.00401ec0
mov eax, dword [ebp + 0x20]
xor ebx, ebx
push ebx
push ebx
cmp dword [eax - 0xc], ebx
jne 0x4026bc
mov ecx, dword [ebp - 0x30]
push ebx
push 1
push ecx
jmp 0x4026c3
mov edx, dword [ebp - 0x30]
push eax
push 3
push edx
call dword [sym.imp.WININET.dll_InternetOpenA]
mov ecx, dword [ebp - 0x18]
push 0
push 0
push 3
push 0
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 0x20]
mov edx, dword [ebp - 0x2c]
push 0
push eax
push ecx
push edx
call dword [sym.imp.WININET.dll_InternetConnectA]
mov edi, eax
mov dword [ebp - 0x38], edi
test edi, edi
je 0x402729
mov dword [ebp - 0x40], 0x53be70
mov dword [ebp - 0x3c], ebx
mov eax, 0x84000100
cmp byte [ebp - 0xd], bl
je 0x40270a
mov eax, 0x84800100
mov ecx, dword [ebp - 0x28]
mov edx, dword [ebp + 0x10]
push 0
push eax
lea eax, [ebp - 0x40]
push eax
push 0
push str.HTTP_1.0
push ecx
push edx
push edi
call dword [sym.imp.WININET.dll_HttpOpenRequestA]
mov ebx, eax
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
mov byte [ebp - 0xd], 0
test ebx, ebx
je 0x402891
mov edx, dword [ebp + 0x18]
mov ecx, dword [ebp - 0x1c]
mov eax, dword [ecx - 0xc]
push edx
mov edx, dword [ebp + 0x14]
push edx
push eax
push ecx
push ebx
mov dword [ebp - 0x14], eax
call dword [sym.imp.WININET.dll_HttpSendRequestA]
test eax, eax
je 0x402888
push 0x2800
call fcn.004134db
mov esi, eax
add esp, 4
test esi, esi
je 0x402888
mov edi, dword [sym.imp.WININET.dll_HttpQueryInfoA]
lea eax, [ebp - 0x34]
push eax
lea ecx, [ebp - 0x14]
push ecx
push esi
push 0x13
push ebx
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x14], 0x27ff
call edi
test eax, eax
je 0x40287c
cmp byte [esi], 0x32
jne 0x40287c
lea edx, [ebp - 0x34]
push edx
lea eax, [ebp - 0x14]
push eax
push esi
push 1
push ebx
mov dword [ebp - 0x14], 0x27ff
call edi
test eax, eax
je 0x402831
mov ecx, dword [ebp - 0x14]
mov byte [ecx + esi], 0
push esi
lea ecx, [ebp - 0x20]
call fcn.00401650
lea ecx, [ebp - 0x20]
mov byte [ebp - 4], 0xf
call fcn.00401c30
mov ecx, dword [ebp - 0x20]
cmp dword [ecx - 0xc], 0
jl 0x402825
push str.utf_8
push ecx
call fcn.00513429
mov ecx, dword [ebp - 0x20]
add esp, 8
test eax, eax
je 0x402801
sub eax, ecx
cmp eax, 0xffffffff
jne 0x402821
cmp dword [ecx - 0xc], 0
jl 0x402825
push str.utf8
push ecx
call fcn.00513429
add esp, 8
test eax, eax
je 0x402825
sub eax, dword [ebp - 0x20]
cmp eax, 0xffffffff
je 0x402825
mov byte [ebp - 0xd], 1
lea ecx, [ebp - 0x20]
mov byte [ebp - 4], 7
call fcn.00401270
mov edi, dword [sym.imp.WININET.dll_InternetReadFile]
lea edx, [ebp - 0x14]
push edx
push 0x27ff
push esi
push ebx
call edi
test eax, eax
je 0x40287c
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x40287c
mov byte [eax + esi], 0
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x402858
mov ecx, dword [ebp + 8]
sub eax, edx
push eax
push esi
call fcn.00401ec0
lea eax, [ebp - 0x14]
push eax
push 0x27ff
push esi
push ebx
call edi
test eax, eax
jne 0x402848
push esi
call fcn.004134e6
mov edi, dword [ebp - 0x38]
add esp, 4
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
push ebx
call esi
test edi, edi
je 0x402898
push edi
call esi
mov eax, dword [ebp - 0x2c]
test eax, eax
je 0x4028a2
push eax
call esi
cmp byte [ebp - 0xd], 0
jne 0x4028f0
mov esi, dword [ebp + 8]
mov eax, dword [esi]
cmp dword [eax - 0xc], 0
jl 0x4028cc
push str.charsetutf_8
push eax
call fcn.00513429
add esp, 8
test eax, eax
je 0x4028cc
sub eax, dword [esi]
cmp eax, 0xffffffff
jne 0x4028f0
mov eax, dword [esi]
cmp dword [eax - 0xc], 0
jl 0x40294e
push str.charset_utf_8_
push eax
call fcn.00513429
add esp, 8
test eax, eax
je 0x40294e
mov ecx, dword [ebp + 8]
sub eax, dword [ecx]
cmp eax, 0xffffffff
je 0x40294e
mov edi, dword [ebp + 8]
mov eax, dword [edi]
push 0
push 0xfde9
push ecx
sub eax, 0x10
mov dword [ebp - 0x38], esp
mov esi, esp
push eax
call fcn.00401350
lea edx, [ebp - 0x38]
add esp, 4
add eax, 0x10
push edx
mov dword [esi], eax
call fcn.00402010
add esp, 0x10
push eax
mov ecx, edi
mov byte [ebp - 4], 0x10
call fcn.00401f80
mov eax, dword [ebp - 0x38]
add eax, 0xfffffff0
mov byte [ebp - 4], 7
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40294e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x30]
add eax, 0xfffffff0
mov byte [ebp - 4], 6
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x402971
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x1c]
add eax, 0xfffffff0
mov byte [ebp - 4], 5
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x402994
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x28]
add eax, 0xfffffff0
mov byte [ebp - 4], 4
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4029b7
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x18]
add eax, 0xfffffff0
mov byte [ebp - 4], 3
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4029da
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp + 0xc]
add eax, 0xfffffff0
mov byte [ebp - 4], 2
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4029fd
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp + 0x10]
add eax, 0xfffffff0
mov byte [ebp - 4], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x402a20
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp + 0x20]
add eax, 0xfffffff0
mov byte [ebp - 4], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x402a43
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret