Function at 0x40a920
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 0x5636a6
mov eax, dword fs:[0]
push eax
sub esp, 0x830
mov eax, dword [0x5c0020]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
push 0
push 0
push 0
push 1
push 0x59a810
mov dword [ebp - 0x82c], 0
call dword [sym.imp.WININET.dll_InternetOpenW]
mov ebx, eax
mov dword [ebp - 0x828], ebx
test ebx, ebx
jne 0x40a980
xor eax, eax
jmp 0x40ac0a
mov esi, dword [sym.imp.WININET.dll_InternetSetOptionW]
push 4
lea eax, [ebp - 0x820]
push eax
push 2
push ebx
mov dword [ebp - 0x820], 0x1388
call esi
push 4
lea eax, [ebp - 0x820]
push eax
push 6
push ebx
call esi
push 4
lea eax, [ebp - 0x820]
push eax
push 5
push ebx
call esi
push 4
lea eax, [ebp - 0x838]
push eax
push 3
push ebx
mov dword [ebp - 0x838], 2
call esi
lea eax, [ebp - 0x834]
push eax
mov ecx, edi
call fcn.0040a6e0
push 0
push 0
push 3
push 0
push 0
push 0x50
push dword [eax]
push ebx
call dword [sym.imp.WININET.dll_InternetConnectW]
mov edx, dword [ebp - 0x834]
mov esi, eax
add edx, 0xfffffff0
mov dword [ebp - 0x824], esi
lea ecx, [edx + 0xc]
or eax, 0xffffffff
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x40aa1d
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
test esi, esi
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
je 0x40abf7
lea eax, [ebp - 0x830]
push eax
mov ecx, edi
call fcn.0040a7c0
push 0
push 0xa0000000
push 0
push 0
push str.HTTP_1.1
mov dword [ebp - 4], 0
push dword [ebp - 0x830]
push 0x59a83c
push dword [ebp - 0x824]
call dword [sym.imp.WININET.dll_HttpOpenRequestW]
mov ebx, eax
test ebx, ebx
je 0x40abc2
call fcn.004273a1
mov ecx, eax
xor eax, eax
test ecx, ecx
setne al
test eax, eax
jne 0x40aa8d
push 0x80004005
call fcn.00406bc0
mov eax, dword [ecx]
call dword [eax + 0xc]
lea esi, [eax + 0x10]
mov dword [ebp - 0x818], esi
push 0x3ff
lea eax, [ebp - 0x413]
mov byte [ebp - 4], 1
push 0
push eax
mov dword [ebp - 0x81c], 0xffffffff
mov byte [ebp - 0x414], 0
call fcn.0053abe0
lea ecx, [ebp - 0x414]
add esp, 0xc
lea edx, [ecx + 1]
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40aad0
sub ecx, edx
push ecx
lea eax, [ebp - 0x414]
push eax
push 0x17
push str.Content_Type:_text_html
push ebx
call dword [sym.imp.WININET.dll_HttpSendRequestW]
test eax, eax
je 0x40ab9a
cmp dword [ebp - 0x81c], 0
je 0x40ab38
lea eax, [ebp - 0x81c]
push eax
push 0x3ff
lea eax, [ebp - 0x814]
push eax
push ebx
call dword [sym.imp.WININET.dll_InternetReadFile]
push dword [ebp - 0x81c]
mov esi, eax
lea eax, [ebp - 0x814]
push eax
lea ecx, [ebp - 0x818]
call fcn.0040b2d0
test esi, esi
jne 0x40aaf7
mov esi, dword [ebp - 0x818]
cmp dword [esi - 4], 1
jle 0x40ab58
push dword [esi - 0xc]
lea ecx, [ebp - 0x818]
call fcn.004098e0
mov esi, dword [ebp - 0x818]
push esi
mov ecx, edi
call fcn.0040ac30
test eax, eax
je 0x40ab82
mov ebx, dword [edi + 0xc]
test ebx, ebx
je 0x40ab82
push dword [ebp + 8]
mov ecx, edi
call fcn.0040af20
mov dword [ebx + 0x30], eax
mov dword [ebp - 0x82c], 1
push ecx
lea ecx, [ebp - 0x818]
call fcn.0040b3a0
push dword [ebp - 0x824]
call dword [sym.imp.WININET.dll_InternetCloseHandle]
add esi, 0xfffffff0
or ebx, 0xffffffff
mov byte [ebp - 4], 0
lea eax, [esi + 0xc]
mov ecx, ebx
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x40abba
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
jmp 0x40abc5
or ebx, 0xffffffff
push dword [ebp - 0x824]
call esi
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x830]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ebx
dec ebx
test ebx, ebx
jg 0x40abf1
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov ebx, dword [ebp - 0x828]
push ebx
call esi
cmp dword [ebp - 0x82c], 0
je 0x40a979
mov eax, dword [edi + 0xc]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0053786f
mov esp, ebp
pop ebp
ret 4