Function at 0x40c2a0
Capabilities:
Prepare http request
Receive http response
Set http header

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x44ad87
mov eax, dword fs:[0]
push eax
sub esp, 0x15c
mov eax, dword [0x45fc58]
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 + 8]
mov ebx, dword [ebp + 0x30]
mov edi, dword [ebp + 0x34]
mov dword [ebp - 0xa8], eax
mov eax, dword [ebp + 0x24]
mov dword [ebp - 0x8c], eax
mov eax, dword [ebp + 0x2c]
mov dword [ebp - 0x9c], eax
mov eax, dword [ebp + 0x38]
mov dword [ebp - 0xa4], eax
mov eax, dword [ebp + 0x3c]
mov dword [ebp - 0xa0], eax
mov eax, dword [ebp + 0x44]
mov dword [ebp - 0x90], ebx
mov dword [ebp - 0x94], eax
xor eax, eax
mov dword [ebp - 4], 0
mov dword [ebp - 0x2c], 7
mov dword [ebp - 0x30], 0
mov word [ebp - 0x40], ax
push 0xffffffffffffffff
push eax
mov dword [ebp - 0x48], eax
mov word [ebp - 0x58], ax
lea eax, [ebp + 0xc]
push eax
lea ecx, [ebp - 0x58]
mov byte [ebp - 4], 1
mov dword [ebp - 0x44], 7
call fcn.00402590
cmp word [ebx], 0
mov byte [ebp - 4], 2
jne 0x40c35a
xor ecx, ecx
jmp 0x40c36f
mov ecx, ebx
lea edx, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40c360
sub ecx, edx
sar ecx, 1
push ecx
push ebx
lea ecx, [ebp - 0x58]
call fcn.0040ca40
xor esi, esi
mov dword [ebp - 0x98], esi
push dword [ebp - 0x8c]
mov byte [ebp - 4], 3
push esi
push esi
push esi
push ebx
push edi
push dword [ebp - 0xa8]
call dword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov ebx, eax
mov dword [ebp - 0x8c], ebx
test ebx, ebx
jne 0x40c3f1
lea ecx, [ebp - 0x168]
call fcn.00406a50
mov edi, eax
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
mov byte [ebp - 4], 4
call eax
push eax
push str.Could_not_open_request__last_error
mov ecx, edi
call fcn.004083c0
push eax
call fcn.004038e0
add esp, 8
mov ecx, eax
call fcn.0040b070
lea ecx, [ebp - 0x168]
mov byte [ebp - 4], 3
call fcn.00406d90
jmp 0x40c709
mov eax, dword [ebp - 0xa4]
mov ecx, dword [eax + 0x10]
test ecx, ecx
je 0x40c453
cmp dword [eax + 0x14], 8
jb 0x40c406
mov eax, dword [eax]
push 0x1000000
push ecx
push eax
push ebx
call dword [sym.imp.WINHTTP.dll_WinHttpAddRequestHeaders]
test eax, eax
jne 0x40c453
push str.Could_not_set_headers
lea ecx, [ebp - 0x28]
call fcn.00401580
lea eax, [ebp - 0x28]
push eax
mov byte [ebp - 4], 5
call fcn.0040ce40
add esp, 4
cmp dword [ebp - 0x14], 0x10
mov byte [ebp - 4], 3
jb 0x40c709
push dword [ebp - 0x28]
call fcn.00418e43
add esp, 4
jmp 0x40c709
mov ecx, dword [ebp - 0xa0]
test ecx, ecx
jne 0x40c50f
mov eax, 0x44dc48
mov cx, word [edi]
cmp cx, word [eax]
jne 0x40c48c
test cx, cx
je 0x40c488
mov cx, word [edi + 2]
cmp cx, word [eax + 2]
jne 0x40c48c
add edi, 4
add eax, 4
test cx, cx
jne 0x40c466
xor eax, eax
jmp 0x40c491
sbb eax, eax
or eax, 1
test eax, eax
je 0x40c4af
cmp dword [0x45f5ec], 0x10
mov eax, dword [0x45f5e8]
mov ecx, 0x45f5d8
cmovae ecx, dword [0x45f5d8]
jmp 0x40c512
push str.content_length:0_r_n
lea ecx, [ebp - 0x40]
call fcn.0040bd00
cmp dword [ebp - 0x2c], 8
push 0x1000000
push dword [ebp - 0x30]
lea eax, [ebp - 0x40]
cmovae eax, dword [ebp - 0x40]
push eax
push ebx
call dword [sym.imp.WINHTTP.dll_WinHttpAddRequestHeaders]
test eax, eax
jne 0x40c509
push str.Could_not_set_content_length_headers
lea ecx, [ebp - 0x28]
call fcn.00401580
lea eax, [ebp - 0x28]
push eax
mov byte [ebp - 4], 6
call fcn.0040ce40
add esp, 4
lea ecx, [ebp - 0x28]
mov byte [ebp - 4], 3
call fcn.004016e0
jmp 0x40c709
mov ecx, dword [ebp - 0xa0]
mov eax, dword [ebp + 0x40]
push 0
push eax
push eax
push ecx
push 0
push 0
push ebx
call dword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
test eax, eax
jne 0x40c532
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
jmp 0x40c709
push 0xdeadbeef
call dword [sym.imp.KERNEL32.dll_SetLastError]
push 0
push ebx
call dword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
test eax, eax
jne 0x40c5f7
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
cmp eax, 0x2ee2
je 0x40c709
mov ecx, dword [ebp - 0x94]
test ecx, ecx
je 0x40c571
mov dword [ecx], eax
jmp 0x40c709
push eax
push str.__last_error
sub esp, 0x18
mov ecx, esp
push dword [ebp - 0x90]
call fcn.00401680
lea eax, [ebp - 0x28]
push eax
call fcn.0040a670
add esp, 0x1c
mov edi, eax
lea ecx, [ebp - 0x168]
mov byte [ebp - 4], 7
call fcn.00406a50
push edi
push str.Failed_to_receive_response_for_URL
mov ecx, eax
mov byte [ebp - 4], 8
call fcn.00408390
push eax
call fcn.004038e0
add esp, 8
push eax
call fcn.004035f0
add esp, 8
push eax
call fcn.004038e0
add esp, 8
mov ecx, eax
call fcn.0040b070
lea ecx, [ebp - 0x168]
mov byte [ebp - 4], 7
call fcn.00406d90
lea ecx, [ebp - 0x28]
mov byte [ebp - 4], 3
call fcn.004016e0
jmp 0x40c709
mov ebx, dword [ebp - 0x9c]
lea eax, [ebp - 0x8c]
push ebx
push eax
call fcn.0040be20
add esp, 8
test al, al
jne 0x40c6a4
mov dword [ebp - 0x14], 0xf
mov dword [ebp - 0x18], 0
mov byte [ebp - 0x28], al
push dword [ebp - 0x90]
lea ecx, [ebp - 0x70]
mov byte [ebp - 4], 9
call fcn.00401680
cmp dword [ebp - 0x5c], 8
lea eax, [ebp - 0x94]
lea edi, [ebp - 0x70]
cmovae edi, dword [ebp - 0x70]
push eax
lea ecx, [ebp - 0x70]
mov byte [ebp - 4], 0xa
call fcn.00402990
push dword [eax]
lea ecx, [ebp - 0x28]
push edi
call fcn.00409e30
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x88]
push str.Failed_to_read_header
push eax
call fcn.0040bab0
push eax
mov byte [ebp - 4], 0xb
call fcn.0040ce40
add esp, 0x10
lea ecx, [ebp - 0x88]
call fcn.004016e0
lea ecx, [ebp - 0x70]
call fcn.00401710
lea ecx, [ebp - 0x28]
mov byte [ebp - 4], 3
call fcn.004016e0
jmp 0x40c703
cmp byte [ebp + 0x28], 0
mov dword [ebp - 0x90], 0
je 0x40c703
lea eax, [ebp - 0x90]
push eax
push ebx
lea eax, [ebp - 0x98]
push eax
lea eax, [ebp - 0x8c]
push eax
call fcn.0040bf90
add esp, 0x10
test al, al
je 0x40c6fd
mov eax, dword [ebp - 0x90]
test eax, eax
je 0x40c6fd
push eax
mov eax, dword [ebp - 0x98]
push ecx
mov ecx, esp
xor esi, esi
mov dword [ecx], eax
mov ecx, ebx
mov dword [ebp - 0x98], esi
call fcn.0040d090
jmp 0x40c703
mov esi, dword [ebp - 0x98]
mov ebx, dword [ebp - 0x8c]
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp - 0x9c]
mov dword [ecx + 0x28], eax
test eax, eax
je 0x40c756
cmp eax, 0x2ef1
jne 0x40c756
lea ecx, [ebp - 0x168]
call fcn.00406a50
push str.operation_got_cancelled_
mov ecx, eax
mov byte [ebp - 4], 0xc
call fcn.004083c0
push eax
call fcn.004038e0
add esp, 8
lea ecx, [ebp - 0x168]
mov byte [ebp - 4], 3
call fcn.00406d90
test ebx, ebx
je 0x40c761
push ebx
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
push esi
call fcn.004195d4
add esp, 4
cmp dword [ebp - 0x44], 8
jb 0x40c77b
push dword [ebp - 0x58]
call fcn.00418e43
add esp, 4
xor eax, eax
cmp dword [ebp - 0x2c], 8
mov dword [ebp - 0x44], 7
mov dword [ebp - 0x48], 0
mov word [ebp - 0x58], ax
jb 0x40c7a0
push dword [ebp - 0x40]
call fcn.00418e43
add esp, 4
xor eax, eax
cmp dword [ebp + 0x20], 8
mov dword [ebp - 0x2c], 7
mov dword [ebp - 0x30], 0
mov word [ebp - 0x40], ax
jb 0x40c7c5
push dword [ebp + 0xc]
call fcn.00418e43
add esp, 4
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.004195d9
mov esp, ebp
pop ebp
ret