Function at 0x40af00
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 0x5300ed
mov eax, dword fs:[0]
push eax
mov eax, 0x1034
call fcn.005163b0
mov eax, dword [0x58deec]
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 + 0x10]
mov esi, dword [ebp + 0xc]
mov ebx, dword [ebp + 8]
push 0xfff
lea ecx, [ebp - 0x100f]
push 0
push ecx
mov dword [ebp - 0x1040], esi
mov dword [ebp - 0x103c], eax
mov byte [ebp - 0x1010], 0
call fcn.005160e0
add esp, 0xc
push 0x5409a6
lea ecx, [ebp - 0x1020]
call fcn.00405830
mov dword [ebp - 4], 0
mov dword [ebp - 0x1030], 0xc350
call fcn.0041e837
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x40af9f
push 0x80004005
call fcn.00401010
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x1024], eax
mov byte [ebp - 4], 1
call fcn.0041e837
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x40afcf
push 0x80004005
call fcn.00401010
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x101c], eax
mov byte [ebp - 4], 2
test ebx, ebx
jne 0x40afed
xor eax, eax
jmp 0x40affb
mov eax, ebx
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40aff2
sub eax, edx
push eax
push ebx
lea ecx, [ebp - 0x101c]
call fcn.00405540
lea ecx, [ebp - 0x101c]
call fcn.00408950
mov dword [esi], 0
call fcn.0041e837
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x40b033
push 0x80004005
call fcn.00401010
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
lea edi, [eax + 0x10]
mov dword [ebp - 0x1014], edi
mov byte [ebp - 4], 3
call fcn.0041e837
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x40b063
push 0x80004005
call fcn.00401010
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x1018], eax
mov esi, dword [ebp - 0x101c]
mov eax, dword [esi - 0xc]
mov byte [ebp - 4], 4
test eax, eax
js 0x40b217
push str.HTTP:__
push esi
call fcn.005173e4
add esp, 8
test eax, eax
je 0x40b217
sub eax, esi
cmp eax, 0xffffffff
jle 0x40b217
lea ecx, [ebp - 0x1018]
push ecx
lea edx, [ebp - 0x1014]
push edx
push ebx
call fcn.0040ac30
mov edi, dword [ebp - 0x1014]
add esp, 0xc
cmp dword [edi - 0xc], 0
mov dword [ebp - 0x1038], 0
jl 0x40b210
push 0x5413e0
push edi
call fcn.005173e4
add esp, 8
test eax, eax
je 0x40b210
sub eax, edi
cmp eax, 0xffffffff
jle 0x40b210
cmp dword [edi - 4], 1
jle 0x40b118
mov eax, dword [edi - 0xc]
push eax
lea ecx, [ebp - 0x1014]
call fcn.00401aa0
mov edi, dword [ebp - 0x1014]
mov eax, edi
lea edx, [eax + 1]
lea ecx, [ecx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40b120
sub eax, edx
cmp dword [edi - 0xc], 0
mov esi, eax
jge 0x40b136
or eax, 0xffffffff
jmp 0x40b14f
push 0x5413e0
push edi
call fcn.005173e4
add esp, 8
test eax, eax
jne 0x40b14d
or eax, 0xffffffff
jmp 0x40b14f
sub eax, edi
push esi
inc eax
push eax
lea ecx, [ebp - 0x1028]
push ecx
lea ecx, [ebp - 0x1014]
call fcn.00408b10
cmp dword [edi - 0xc], 0
mov byte [ebp - 4], 5
jge 0x40b173
or eax, 0xffffffff
jmp 0x40b18c
push 0x5413e0
push edi
call fcn.005173e4
add esp, 8
test eax, eax
jne 0x40b18a
or eax, 0xffffffff
jmp 0x40b18c
sub eax, edi
push eax
push 0
lea edx, [ebp - 0x1034]
push edx
lea ecx, [ebp - 0x1014]
call fcn.00408b10
push eax
lea ecx, [ebp - 0x1014]
mov byte [ebp - 4], 6
call fcn.004056a0
mov eax, dword [ebp - 0x1034]
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 0x40b1d7
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov esi, dword [ebp - 0x1028]
push esi
call fcn.005163a3
mov ebx, eax
lea eax, [esi - 0x10]
add esp, 4
mov byte [ebp - 4], 4
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40b25c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edi, dword [ebp - 0x1014]
jmp 0x40b26a
mov ebx, 0x50
jmp 0x40b26a
cmp dword [esi - 0xc], 0
jl 0x40b264
push str.HTTPS:__
push esi
call fcn.005173e4
add esp, 8
test eax, eax
je 0x40b264
sub eax, esi
cmp eax, 0xffffffff
jle 0x40b264
lea ecx, [ebp - 0x1018]
push ecx
lea edx, [ebp - 0x1014]
push edx
push ebx
call fcn.0040ac30
add esp, 0xc
mov dword [ebp - 0x1038], 0x801000
mov ebx, 0x1bb
mov edi, dword [ebp - 0x1014]
jmp 0x40b26a
mov ebx, dword [ebp - 0x1034]
push 0
push 0x5409a6
lea ecx, [ebp - 0x1020]
call fcn.00408cc0
push 0
push 0
push 0
push 0
push str.Mozilla_4.0__compatible__MSIE_5.5_
call dword [sym.imp.WININET.dll_InternetOpenA]
mov esi, eax
mov dword [ebp - 0x1028], esi
test esi, esi
jne 0x40b2ea
mov eax, dword [ebp - 0x1018]
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 0x40b2c1
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
add edi, 0xfffffff0
mov byte [ebp - 4], 2
lea ecx, [edi + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40b4f5
mov ecx, dword [edi]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push edi
call edx
jmp 0x40b4f5
push 4
lea ecx, [ebp - 0x1030]
push ecx
push 2
push esi
call dword [sym.imp.WININET.dll_InternetSetOptionA]
push 0
push 0
push 3
push 0x541354
push 0x541354
push ebx
push edi
push esi
call dword [sym.imp.WININET.dll_InternetConnectA]
mov ebx, eax
test ebx, ebx
jne 0x40b371
push esi
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov eax, dword [ebp - 0x1018]
add eax, 0xfffffff0
mov byte [ebp - 4], 3
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40b348
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
add edi, 0xfffffff0
mov byte [ebp - 4], 2
lea ecx, [edi + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40b4f5
mov ecx, dword [edi]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push edi
call edx
jmp 0x40b4f5
mov edi, dword [sym.imp.WININET.dll_InternetSetOptionA]
push 4
lea ecx, [ebp - 0x1030]
push ecx
push 6
push ebx
call edi
push 4
lea edx, [ebp - 0x1030]
push edx
push 5
push ebx
call edi
mov eax, dword [ebp - 0x1038]
push 1
or eax, 0x80680000
push eax
mov eax, dword [ebp - 0x1018]
push 0
push 0x5409a6
push str.HTTP_1.0
push eax
push 0x5413a0
push ebx
call dword [sym.imp.WININET.dll_HttpOpenRequestA]
mov edi, eax
test edi, edi
jne 0x40b3d1
mov edi, dword [sym.imp.WININET.dll_InternetCloseHandle]
jmp 0x40b4a3
mov eax, dword [ebp - 0x1020]
mov ecx, dword [eax - 0xc]
push 0
push 0x5409a6
push ecx
push eax
push edi
call dword [sym.imp.WININET.dll_HttpSendRequestA]
test eax, eax
jne 0x40b3f9
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x40b49a
lea ecx, [ebp - 0x102c]
push ecx
push 0xfff
lea edx, [ebp - 0x1010]
push edx
push edi
xor esi, esi
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x40b494
lea esp, [esp]
mov eax, dword [ebp - 0x102c]
test eax, eax
je 0x40b584
mov byte [ebp + eax - 0x1010], 0
add eax, esi
push eax
mov eax, dword [ebp - 0x103c]
mov ecx, dword [eax]
push ecx
call fcn.00517a2a
mov edx, dword [ebp - 0x103c]
mov ecx, dword [ebp - 0x102c]
mov dword [edx], eax
push ecx
lea edx, [ebp - 0x1010]
push edx
add eax, esi
push eax
call fcn.005169a0
add esi, dword [ebp - 0x102c]
mov eax, dword [ebp - 0x1040]
add esp, 0x14
lea ecx, [ebp - 0x102c]
push ecx
push 0xfff
lea edx, [ebp - 0x1010]
push edx
push edi
mov dword [eax], esi
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
jne 0x40b420
mov esi, dword [ebp - 0x1028]
push edi
mov edi, dword [sym.imp.WININET.dll_InternetCloseHandle]
call edi
push ebx
call edi
push esi
call edi
mov eax, dword [ebp - 0x1018]
add eax, 0xfffffff0
or edx, 0xffffffff
lea ecx, [eax + 0xc]
mov byte [ebp - 4], 3
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40b4cf
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x1014]
add eax, 0xfffffff0
or edx, 0xffffffff
lea ecx, [eax + 0xc]
mov byte [ebp - 4], 2
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40b4f5
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x101c]
add eax, 0xfffffff0
or edx, 0xffffffff
lea ecx, [eax + 0xc]
mov byte [ebp - 4], 1
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40b51b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x1024]
add eax, 0xfffffff0
or edx, 0xffffffff
lea ecx, [eax + 0xc]
mov byte [ebp - 4], 0
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40b541
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x1020]
add eax, 0xfffffff0
or edx, 0xffffffff
lea ecx, [eax + 0xc]
mov dword [ebp - 4], edx
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40b566
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
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.005156a7
mov esp, ebp
pop ebp
ret
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
push edi
call esi
push ebx
call esi
mov eax, dword [ebp - 0x1028]
push eax
call esi
lea ecx, [ebp - 0x1018]
call fcn.00401690
lea ecx, [ebp - 0x1014]
call fcn.00401690
lea ecx, [ebp - 0x101c]
call fcn.00401690
lea ecx, [ebp - 0x1024]
call fcn.00401690
lea ecx, [ebp - 0x1020]
call fcn.00401690
mov eax, 1
jmp 0x40b568