Function at 0x40c690
Capabilities:
Check http status code
Get http content length
Resolve function by parsing pe exports

Disassembly:
push 0xffffffffffffffff
push 0x427a20
mov eax, dword fs:[0]
push eax
sub esp, 0x50
push ebx
push ebp
push esi
push edi
mov eax, dword [0x430240]
xor eax, esp
push eax
lea eax, [esp + 0x64]
mov dword fs:[0], eax
mov eax, dword [esp + 0xcc]
mov ebp, dword [esp + 0xc8]
mov dword [esp + 0x2c], eax
mov dword [esp + 0x6c], 2
mov eax, dword [esp + 0xb0]
mov ecx, 8
cmp dword [esp + 0xc4], ecx
jae 0x40c6ed
lea eax, [esp + 0xb0]
cmp dword [esp + 0xa8], ecx
mov edx, dword [esp + 0x94]
jae 0x40c704
lea edx, [esp + 0x94]
cmp dword [esp + 0x8c], ecx
mov ecx, dword [esp + 0x78]
jae 0x40c715
lea ecx, [esp + 0x78]
mov esi, dword [esp + 0xc0]
push esi
push eax
lea ebx, [esp + 0x24]
call fcn.00412560
mov byte [esp + 0x6c], 3
mov eax, dword [esp + 0x1c]
mov edi, dword [sym.imp.WININET.dll_HttpQueryInfoW]
xor ebx, ebx
cmp eax, ebx
mov esi, 4
mov dword [esp + 0x28], esi
je 0x40c75c
push ebx
lea ecx, [esp + 0x2c]
push ecx
lea edx, [esp + 0x38]
push edx
push 0x20000013
push eax
call edi
mov eax, dword [esp + 0x1c]
cmp dword [esp + 0x30], 0xc8
je 0x40c82a
mov ecx, dword [esp + 0x20]
cmp ecx, ebx
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
je 0x40c77f
push ecx
call esi
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x24]
cmp ecx, ebx
je 0x40c78e
push ecx
call esi
mov eax, dword [esp + 0x1c]
cmp eax, ebx
je 0x40c799
push eax
call esi
mov dword [esp + 0x1c], ebx
mov edi, 8
cmp dword [esp + 0x8c], edi
jb 0x40c7b4
mov eax, dword [esp + 0x78]
push eax
call fcn.00413bbf
add esp, 4
cmp dword [esp + 0xa8], edi
mov esi, 7
mov word [esp + 0x78], bx
mov dword [esp + 0x88], ebx
mov dword [esp + 0x8c], esi
jb 0x40c7e5
mov ecx, dword [esp + 0x94]
push ecx
call fcn.00413bbf
add esp, 4
cmp dword [esp + 0xc4], edi
mov dword [esp + 0xa8], esi
mov dword [esp + 0xa4], ebx
mov word [esp + 0x94], bx
jb 0x40c814
mov edx, dword [esp + 0xb0]
push edx
call fcn.00413bbf
add esp, 4
xor al, al
mov ecx, dword [esp + 0x64]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x5c
ret
cmp eax, ebx
mov byte [esp + 0x17], bl
mov dword [esp + 0x18], ebx
mov dword [esp + 0x28], esi
je 0x40c85a
push ebx
lea ecx, [esp + 0x2c]
push ecx
lea edx, [esp + 0x20]
push edx
push 0x20000005
push eax
call edi
test eax, eax
setne al
cmp al, bl
jne 0x40c945
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x2f76
jne 0x40c922
mov eax, 0xa00000
mov byte [esp + 0x17], 1
mov dword [esp + 0x18], eax
lea edi, [eax + 1]
mov esi, ebp
call fcn.0040ca70
mov eax, dword [esp + 0x18]
xor esi, esi
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], esi
call dword [sym.imp.KERNEL32.dll_GetTickCount]
fldz
mov ecx, dword [esp + 0x18]
fst qword [esp + 0x44]
mov edx, dword [ebp + 8]
fstp qword [esp + 0x54]
add ecx, 1
push ecx
push ebx
push edx
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], eax
call fcn.00415be0
mov eax, dword [esp + 0x24]
add esp, 0xc
xor edi, edi
cmp eax, ebx
jbe 0x40c967
lea esp, [esp]
cmp byte [esp + 0x17], bl
mov edx, 0x1000
jne 0x40c8e3
sub eax, esi
cmp eax, edx
jae 0x40c8e3
mov edx, eax
mov eax, dword [ebp + 8]
add esi, eax
push esi
lea esi, [esp + 0x38]
lea eax, [esp + 0x20]
call fcn.00412710
cmp eax, 0xffffffff
je 0x40c95f
cmp eax, ebx
jne 0x40c914
cmp byte [esp + 0x17], bl
jne 0x40c95f
push 0xa
call sub.KERNEL32.dll_Sleep
add edi, 1
cmp edi, 3
ja 0x40c95f
mov esi, dword [esp + 0x40]
mov eax, dword [esp + 0x18]
cmp esi, eax
jb 0x40c8d0
jmp 0x40c967
mov eax, dword [esp + 0x20]
cmp eax, ebx
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
je 0x40c933
push eax
call esi
mov eax, dword [esp + 0x24]
cmp eax, ebx
je 0x40c78a
push eax
jmp 0x40c788
mov eax, dword [esp + 0x18]
cmp eax, ebx
jne 0x40c879
lea esi, [esp + 0x1c]
call fcn.004126e0
jmp 0x40c799
mov eax, dword [esp + 0x18]
mov esi, dword [esp + 0x40]
cmp esi, eax
je 0x40c9a0
cmp byte [esp + 0x17], bl
jne 0x40c9a6
lea esi, [esp + 0x1c]
call fcn.004126e0
lea esi, [esp + 0x74]
call fcn.00404b40
lea esi, [esp + 0x90]
call fcn.00404b40
lea esi, [esp + 0xac]
call fcn.00404b40
jmp 0x40c814
cmp byte [esp + 0x17], bl
je 0x40c9ae
mov eax, dword [esp + 0x2c]
mov dword [eax], esi
jmp 0x40c9b4
mov ecx, dword [esp + 0x2c]
mov dword [ecx], eax
mov eax, dword [esp + 0x20]
cmp eax, ebx
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
je 0x40c9c5
push eax
call esi
mov eax, dword [esp + 0x24]
cmp eax, ebx
je 0x40c9d0
push eax
call esi
mov eax, dword [esp + 0x1c]
cmp eax, ebx
je 0x40c9df
push eax
call esi
mov dword [esp + 0x1c], ebx
mov edi, 8
cmp dword [esp + 0x8c], edi
jb 0x40c9fa
mov edx, dword [esp + 0x78]
push edx
call fcn.00413bbf
add esp, 4
cmp dword [esp + 0xa8], edi
mov esi, 7
mov dword [esp + 0x8c], esi
mov dword [esp + 0x88], ebx
mov word [esp + 0x78], bx
jb 0x40ca2b
mov eax, dword [esp + 0x94]
push eax
call fcn.00413bbf
add esp, 4
cmp dword [esp + 0xc4], edi
mov dword [esp + 0xa8], esi
mov dword [esp + 0xa4], ebx
mov word [esp + 0x94], bx
jb 0x40ca5a
mov ecx, dword [esp + 0xb0]
push ecx
call fcn.00413bbf
add esp, 4
mov al, 1
mov ecx, dword [esp + 0x64]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x5c
ret