Function at 0x40c940
Capabilities:
Check http status code
Read data from internet
Receive data
Send data
Send http request

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x142c
call fcn.004149d0
mov eax, dword [0x427550]
push ebx
xor eax, ebp
push esi
mov esi, dword [ebp + 0x10]
mov dword [esp + 0x1430], eax
mov eax, dword [ebp + 0xc]
mov ebx, ecx
push edi
mov edi, dword [ebp + 8]
lea ecx, [ebx + 0x48]
mov dword [esp + 0x10], eax
mov dword [esp + 0x18], esi
call fcn.004063b0
push edi
mov ecx, ebx
call fcn.0040c120
test eax, eax
jne 0x40c9a4
mov eax, SysReAllocStringLen
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x1428]
xor ecx, ebp
call fcn.00413041
mov esp, ebp
pop ebp
ret 0x14
mov ecx, dword [ebp + 0x18]
push ecx
mov ecx, ebx
call fcn.0040c250
test eax, eax
je 0x40cc86
mov eax, dword [ebx + 0x40]
test eax, eax
jne 0x40cbf7
mov eax, dword [ebp + 0x14]
test eax, eax
mov ecx, 0x4400010
jne 0x40c9d3
mov ecx, 0x4600010
mov eax, dword [ebx + 0x24]
mov edx, dword [ebx + 8]
push 0
push ecx
push 0x4270bc
push 0
push str.HTTP_1.0
push eax
push 0x421df4
push edx
call dword [sym.imp.WININET.dll_HttpOpenRequestA]
test eax, eax
mov dword [ebx + 0xc], eax
je 0x40cc76
push 0
push 0
push 0
push 0
push eax
call dword [sym.imp.WININET.dll_HttpSendRequestA]
test eax, eax
jne 0x40ca74
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, ebx
mov dword [ebx + 0x50], eax
call fcn.0040b720
mov ebx, dword [ebx + 0x50]
sub ebx, 0x2ee2
je 0x40ca58
sub ebx, 5
je 0x40ca3c
sub ebx, 0x16
jne 0x40cc86
mov eax, reloc.OLEAUT32.dll_VariantClear
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x1428]
xor ecx, ebp
call fcn.00413041
mov esp, ebp
pop ebp
ret 0x14
mov eax, VariantCopy
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x1428]
xor ecx, ebp
call fcn.00413041
mov esp, ebp
pop ebp
ret 0x14
mov edx, dword [ebx + 0xc]
push 0
lea eax, [esp + 0x20]
push eax
lea ecx, [esp + 0x28]
push ecx
push 0x20000013
push edx
mov dword [esp + 0x34], 0
mov dword [esp + 0x30], 4
call dword [sym.imp.WININET.dll_HttpQueryInfoA]
test eax, eax
je 0x40cc76
mov eax, dword [esp + 0x20]
cmp eax, 0xc8
je 0x40cb3f
cmp eax, 0x12c
jbe 0x40cc7f
cmp eax, 0x12e
ja 0x40cc7f
mov edx, dword [ebx + 0xc]
xor eax, eax
push eax
mov byte [esp + 0x2c], 0
mov ecx, 0x100
lea edi, [esp + 0x2d]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x20]
push eax
lea ecx, [esp + 0x30]
push ecx
push 0x21
push edx
mov dword [esp + 0x30], 0x400
call dword [sym.imp.WININET.dll_HttpQueryInfoA]
test eax, eax
je 0x40cc76
lea eax, [esp + 0x28]
push eax
lea ecx, [ebx + 0x48]
call fcn.00408ca0
mov ecx, dword [ebx + 0xc]
push ecx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov dword [ebx + 0xc], 0
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x1428]
xor ecx, ebp
call fcn.00413041
mov esp, ebp
pop ebp
ret 0x14
mov eax, dword [ebx + 0x40]
test eax, eax
jne 0x40cbf7
mov edx, dword [esp + 0x10]
xor eax, eax
mov ecx, 0x400
lea edi, [esp + 0x430]
rep stosd dword es:[edi], eax
mov edi, dword [esi]
mov dword [esp + 0x10], edx
mov dword [esp + 0x24], edi
mov dword [esi], eax
lea ebx, [ebx]
mov eax, dword [ebx + 0x40]
test eax, eax
mov dword [esp + 0x14], 0
jne 0x40cbf7
mov edx, dword [ebx + 0xc]
lea eax, [esp + 0x14]
push eax
push 0xfff
lea ecx, [esp + 0x438]
push ecx
push edx
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x40cc76
mov ecx, dword [esp + 0x14]
test ecx, ecx
jbe 0x40cc3f
mov eax, dword [esi]
add eax, ecx
cmp eax, edi
ja 0x40cc1a
mov edi, dword [esp + 0x10]
mov edx, ecx
shr ecx, 2
lea esi, [esp + 0x430]
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x18]
mov eax, dword [esp + 0x14]
mov esi, dword [esp + 0x10]
mov edx, dword [ecx]
add esi, eax
add edx, eax
test eax, eax
mov dword [esp + 0x10], esi
mov dword [ecx], edx
jbe 0x40cc3f
mov edi, dword [esp + 0x24]
mov esi, ecx
jmp 0x40cb70
mov ecx, ebx
call fcn.0040b720
mov eax, 2
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x1428]
xor ecx, ebp
call fcn.00413041
mov esp, ebp
pop ebp
ret 0x14
sub edi, dword [esi]
mov eax, edi
mov edi, dword [esp + 0x10]
mov ecx, eax
mov edx, ecx
shr ecx, 2
lea esi, [esp + 0x430]
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x18]
add dword [ecx], eax
mov eax, dword [ebx + 0xc]
push eax
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov edx, dword [esp + 0x14]
xor ecx, ecx
cmp ecx, edx
sbb eax, eax
mov dword [ebx + 0xc], 0
and eax, reloc.OLEAUT32.dll_SysStringLen
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x1428]
xor ecx, ebp
call fcn.00413041
mov esp, ebp
pop ebp
ret 0x14
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebx + 0x50], eax
mov ecx, ebx
call fcn.0040b720
mov ecx, dword [esp + 0x1434]
pop edi
pop esi
xor ecx, ebp
or eax, 0xffffffff
pop ebx
call fcn.00413041
mov esp, ebp
pop ebp
ret 0x14