Function at 0x40c600
Capabilities:
Check http status code
Prepare http request
Read http header
Receive http response

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x264
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov eax, edx
mov byte [ebp - 0x229], 0
mov edx, dword [ebp + 0xc]
xor ebx, ebx
push esi
mov esi, ecx
mov dword [ebp - 0x234], edx
mov ecx, dword [ebp + 0x10]
mov dword [ebp - 0x210], ecx
mov ecx, dword [ebp + 0x14]
mov dword [edx], 0
mov edx, dword [ebp - 0x210]
mov dword [ebp - 0x228], ebx
mov dword [ebp - 0x224], ebx
mov dword [ebp - 0x220], ebx
mov ebx, 6
mov dword [ebp - 0x20c], esi
mov dword [ebp - 0x214], ecx
mov dword [edx], 0
push edi
mov edi, dword [ebp + 8]
test ecx, ecx
je 0x40c67a
mov dword [ecx], 0
lea ecx, [ebp - 0x264]
mov edx, 0xf
push ecx
mov ecx, eax
call fcn.0040cca0
test al, al
je 0x40c886
mov eax, dword [ebp - 0x264]
push 0
push dword [ebp - 0x250]
push dword [eax + 4]
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov ecx, eax
mov dword [ebp - 0x230], ecx
test ecx, ecx
je 0x40c886
cmp dword [ebp - 0x254], 2
mov edx, 0x800100
mov eax, 0x100
cmove eax, edx
push eax
mov eax, dword [ebp - 0x260]
push 0
push 0
push 0
push dword [eax + 4]
push 0
push ecx
call dword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov esi, eax
test esi, esi
je 0x40c879
push 4
lea eax, [ebp - 0x218]
mov dword [ebp - 0x218], 8
push eax
push 0x3f
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpSetOption]
test edi, edi
je 0x40c811
cmp dword ds:[edi], 0
je 0x40c811
mov eax, dword [edi + 4]
test eax, eax
je 0x40c811
cmp word [eax], 0
je 0x40c811
lea eax, [ebp - 0x24c]
mov edx, 0x36
push eax
mov ecx, edi
call fcn.0040cca0
test al, al
je 0x40c811
movzx eax, word [ebp - 0x238]
push eax
mov eax, dword [ebp - 0x24c]
push dword [eax + 4]
lea eax, [ebp - 0x208]
push str._s:_hu
push 0x100
push eax
call fcn.00409bc0
add esp, 0x14
mov dword [ebp - 0x228], 3
lea eax, [ebp - 0x208]
mov dword [ebp - 0x224], eax
lea eax, [ebp - 0x228]
push 0xc
push eax
push 0x26
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpSetOption]
mov ecx, dword [ebp - 0x244]
test ecx, ecx
je 0x40c7d5
mov eax, dword [ecx]
test eax, eax
je 0x40c7d5
mov ecx, dword [ecx + 4]
test ecx, ecx
je 0x40c7d5
cmp word [ecx], 0
je 0x40c7d5
shr eax, 1
push eax
push ecx
push 0x1002
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpSetOption]
mov ecx, dword [ebp - 0x240]
test ecx, ecx
je 0x40c806
mov eax, dword [ecx]
test eax, eax
je 0x40c806
mov ecx, dword [ecx + 4]
test ecx, ecx
je 0x40c806
cmp word [ecx], 0
je 0x40c806
shr eax, 1
push eax
push ecx
push 0x1003
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpSetOption]
lea ecx, [ebp - 0x24c]
call fcn.0040cfa0
mov edi, dword [ebp - 0x20c]
push 0
push 0
push 0
push 0
push 0
push 0
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
test eax, eax
jne 0x40c8d4
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x34]
cmp eax, 0x2f00
je 0x40c8e4
cmp eax, 0x2efe
jne 0x40c8ab
push 4
lea eax, [ebp - 0x20c]
mov dword [ebp - 0x20c], 0x800
push eax
push 0x54
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpSetOption]
test eax, eax
jne 0x40c8e4
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov eax, dword [ebp - 0x230]
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
lea ecx, [ebp - 0x264]
call fcn.0040cfa0
mov ecx, dword ds:[ebp - 4]
mov al, byte [ebp - 0x229]
xor ecx, ebp
pop edi
pop esi
pop ebx
call fcn.00414c55
mov esp, ebp
pop ebp
ret 0x10
cmp eax, 0x2f8f
jne 0x40c872
push 4
lea eax, [ebp - 0x20c]
mov dword [ebp - 0x20c], 0x300
push eax
push 0x1f
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpSetOption]
test eax, eax
je 0x40c872
jmp 0x40c8e4
push 0
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
lea ecx, [ecx]
test eax, eax
jne 0x40c8ef
sub ebx, 1
jne 0x40c817
jmp 0x40c872
push 0
lea eax, [ebp - 0x21c]
mov dword [ebp - 0x20c], 0
push eax
lea eax, [ebp - 0x20c]
mov dword [ebp - 0x21c], 4
push eax
push 0
push 0x20000013
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
test eax, eax
je 0x40c872
cmp dword [ebp - 0x20c], 0xc8
jne 0x40c872
mov ecx, dword [ebp - 0x234]
mov eax, dword [ebp - 0x230]
mov edi, dword [ebp - 0x214]
mov dword [ecx], eax
mov eax, dword [ebp - 0x210]
mov dword [eax], esi
test edi, edi
je 0x40c99c
push 0
lea eax, [ebp - 0x214]
mov dword [ebp - 0x210], 0
push eax
lea eax, [ebp - 0x210]
mov dword [ebp - 0x214], 4
push eax
push 0
push 0x20000005
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
neg eax
sbb eax, eax
and eax, dword [ebp - 0x210]
mov dword [edi], eax
mov byte [ebp - 0x229], 1
jmp 0x40c886