Function at 0x40bf00
Capabilities:
Check http status code
Read http header
Receive http response

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
mov dword [ebp - 8], 0
mov dword [ebp - 4], 0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0xc], 0
mov dword [ebp - 0x10], 0
mov eax, dword [ebp + 0x10]
mov ecx, dword [eax]
mov dword [ebp - 8], ecx
mov edx, dword [ebp + 0x10]
mov dword [edx], 0
push 0
lea eax, [ebp - 4]
push eax
push 0
push 0
push 0x16
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 8]
push edx
call dword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
test eax, eax
jne 0x40bf85
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
je 0x40bf85
mov dword [ebp - 0x18], 0xffffffff
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x14], eax
jmp 0x40c147
mov eax, dword [ebp - 4]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jne 0x40bfb6
mov dword [ebp - 0x18], 0xfffffffe
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x14], eax
jmp 0x40c147
push 0
lea ecx, [ebp - 4]
push ecx
mov edx, dword [ebp - 0xc]
push edx
push 0
push 0x16
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 8]
push ecx
call dword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
test eax, eax
jne 0x40bfea
mov dword [ebp - 0x18], 0xfffffffd
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x14], eax
jmp 0x40c147
mov dword [ebp - 4], 4
push 0
lea edx, [ebp - 4]
push edx
lea eax, [ebp - 0x1c]
push eax
push 0
push 0x20000013
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 8]
push edx
call dword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
cmp dword [ebp - 0x1c], 0xc8
je 0x40c02a
mov dword [ebp - 0x18], 0xfffffffc
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x14], eax
jmp 0x40c147
mov dword [ebp - 4], 0
jmp 0x40c03a
mov dword [ebp - 4], 0
lea ecx, [ebp - 4]
push ecx
mov edx, dword [ebp + 8]
mov eax, dword [edx + 8]
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
test eax, eax
jne 0x40c064
mov dword [ebp - 0x18], 0xfffffffb
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x14], eax
jmp 0x40c140
cmp dword [ebp - 4], 0
jne 0x40c06f
jmp 0x40c140
mov ecx, dword [ebp - 4]
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jne 0x40c0a0
mov dword [ebp - 0x18], 0xfffffffa
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x14], eax
jmp 0x40c140
push 0
mov edx, dword [ebp - 4]
push edx
mov eax, dword [ebp - 0x10]
push eax
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 8]
push edx
call dword [sym.imp.WINHTTP.dll_WinHttpReadData]
test eax, eax
jne 0x40c0cd
mov dword [ebp - 0x18], 0xfffffff9
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x14], eax
jmp 0x40c140
cmp dword [ebp - 8], 0
jne 0x40c0ee
mov eax, dword [ebp - 4]
push eax
mov ecx, dword [ebp - 0x10]
push ecx
mov edx, dword [ebp + 0x10]
mov eax, dword [ebp + 0xc]
add eax, dword [edx]
push eax
call fcn.004035f0
add esp, 0xc
jmp 0x40c114
mov ecx, dword [ebp + 0x10]
mov edx, dword [ecx]
add edx, dword [ebp - 4]
cmp dword [ebp - 8], edx
jle 0x40c114
mov eax, dword [ebp - 4]
push eax
mov ecx, dword [ebp - 0x10]
push ecx
mov edx, dword [ebp + 0x10]
mov eax, dword [ebp + 0xc]
add eax, dword [edx]
push eax
call fcn.004035f0
add esp, 0xc
mov ecx, dword [ebp - 0x10]
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov edx, dword [ebp + 0x10]
mov eax, dword [edx]
add eax, dword [ebp - 4]
mov ecx, dword [ebp + 0x10]
mov dword [ecx], eax
mov dword [ebp - 0x10], 0
jmp 0x40c033
jmp 0x40c147
cmp dword [ebp - 0x10], 0
je 0x40c160
mov edx, dword [ebp - 0x10]
push edx
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
cmp dword [ebp - 0xc], 0
je 0x40c179
mov eax, dword [ebp - 0xc]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov ecx, dword [ebp - 0x1c]
push ecx
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [ebp - 0x18]
mov esp, ebp
pop ebp
ret 0xc