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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x44a9c7
mov eax, dword fs:[0]
push eax
sub esp, 0x15c
mov eax, dword [0x45fc48]
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.00402580
cmp word [ebx], 0
mov byte [ebp - 4], 2
jne 0x40c0ba
xor ecx, ecx
jmp 0x40c0cf
mov ecx, ebx
lea edx, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40c0c0
sub ecx, edx
sar ecx, 1
push ecx
push ebx
lea ecx, [ebp - 0x58]
call fcn.0040c7a0
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 0x40c151
lea ecx, [ebp - 0x168]
call fcn.00406850
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.00408180
push eax
call fcn.004038b0
add esp, 8
mov ecx, eax
call fcn.0040ae20
lea ecx, [ebp - 0x168]
mov byte [ebp - 4], 3
call fcn.00406ba0
jmp 0x40c469
mov eax, dword [ebp - 0xa4]
mov ecx, dword [eax + 0x10]
test ecx, ecx
je 0x40c1b3
cmp dword [eax + 0x14], 8
jb 0x40c166
mov eax, dword [eax]
push 0x1000000
push ecx
push eax
push ebx
call dword [sym.imp.WINHTTP.dll_WinHttpAddRequestHeaders]
test eax, eax
jne 0x40c1b3
push str.Could_not_set_headers
lea ecx, [ebp - 0x28]
call fcn.00401590
lea eax, [ebp - 0x28]
push eax
mov byte [ebp - 4], 5
call fcn.0040cb70
add esp, 4
cmp dword [ebp - 0x14], 0x10
mov byte [ebp - 4], 3
jb 0x40c469
push dword [ebp - 0x28]
call fcn.00418b1b
add esp, 4
jmp 0x40c469
mov ecx, dword [ebp - 0xa0]
test ecx, ecx
jne 0x40c26f
mov eax, 0x44dc30
mov cx, word [edi]
cmp cx, word [eax]
jne 0x40c1ec
test cx, cx
je 0x40c1e8
mov cx, word [edi + 2]
cmp cx, word [eax + 2]
jne 0x40c1ec
add edi, 4
add eax, 4
test cx, cx
jne 0x40c1c6
xor eax, eax
jmp 0x40c1f1
sbb eax, eax
or eax, 1
test eax, eax
je 0x40c20f
cmp dword [0x45f5ec], 0x10
mov eax, dword [0x45f5e8]
mov ecx, 0x45f5d8
cmovae ecx, dword [0x45f5d8]
jmp 0x40c272
push str.content_length:0_r_n
lea ecx, [ebp - 0x40]
call fcn.0040ba60
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 0x40c269
push str.Could_not_set_content_length_headers
lea ecx, [ebp - 0x28]
call fcn.00401590
lea eax, [ebp - 0x28]
push eax
mov byte [ebp - 4], 6
call fcn.0040cb70
add esp, 4
lea ecx, [ebp - 0x28]
mov byte [ebp - 4], 3
call fcn.004016f0
jmp 0x40c469
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 0x40c292
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
jmp 0x40c469
push 0xdeadbeef
call dword [sym.imp.KERNEL32.dll_SetLastError]
push 0
push ebx
call dword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
test eax, eax
jne 0x40c357
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
cmp eax, 0x2ee2
je 0x40c469
mov ecx, dword [ebp - 0x94]
test ecx, ecx
je 0x40c2d1
mov dword [ecx], eax
jmp 0x40c469
push eax
push str.__last_error
sub esp, 0x18
mov ecx, esp
push dword [ebp - 0x90]
call fcn.00401690
lea eax, [ebp - 0x28]
push eax
call fcn.0040a420
add esp, 0x1c
mov edi, eax
lea ecx, [ebp - 0x168]
mov byte [ebp - 4], 7
call fcn.00406850
push edi
push str.Failed_to_receive_response_for_URL
mov ecx, eax
mov byte [ebp - 4], 8
call fcn.00408150
push eax
call fcn.004038b0
add esp, 8
push eax
call fcn.004035c0
add esp, 8
push eax
call fcn.004038b0
add esp, 8
mov ecx, eax
call fcn.0040ae20
lea ecx, [ebp - 0x168]
mov byte [ebp - 4], 7
call fcn.00406ba0
lea ecx, [ebp - 0x28]
mov byte [ebp - 4], 3
call fcn.004016f0
jmp 0x40c469
mov ebx, dword [ebp - 0x9c]
lea eax, [ebp - 0x8c]
push ebx
push eax
call fcn.0040bb60
add esp, 8
test al, al
jne 0x40c404
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.00401690
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.00402960
push dword [eax]
lea ecx, [ebp - 0x28]
push edi
call fcn.00409bb0
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x88]
push str.Failed_to_read_header
push eax
call fcn.0040b860
push eax
mov byte [ebp - 4], 0xb
call fcn.0040cb70
add esp, 0x10
lea ecx, [ebp - 0x88]
call fcn.004016f0
lea ecx, [ebp - 0x70]
call fcn.00401720
lea ecx, [ebp - 0x28]
mov byte [ebp - 4], 3
call fcn.004016f0
jmp 0x40c463
cmp byte [ebp + 0x28], 0
mov dword [ebp - 0x90], 0
je 0x40c463
lea eax, [ebp - 0x90]
push eax
push ebx
lea eax, [ebp - 0x98]
push eax
lea eax, [ebp - 0x8c]
push eax
call fcn.0040bcd0
add esp, 0x10
test al, al
je 0x40c45d
mov eax, dword [ebp - 0x90]
test eax, eax
je 0x40c45d
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.0040cdc0
jmp 0x40c463
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 0x40c4b6
cmp eax, 0x2ef1
jne 0x40c4b6
lea ecx, [ebp - 0x168]
call fcn.00406850
push str.operation_got_cancelled_
mov ecx, eax
mov byte [ebp - 4], 0xc
call fcn.00408180
push eax
call fcn.004038b0
add esp, 8
lea ecx, [ebp - 0x168]
mov byte [ebp - 4], 3
call fcn.00406ba0
test ebx, ebx
je 0x40c4c1
push ebx
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
push esi
call fcn.004192a4
add esp, 4
cmp dword [ebp - 0x44], 8
jb 0x40c4db
push dword [ebp - 0x58]
call fcn.00418b1b
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 0x40c500
push dword [ebp - 0x40]
call fcn.00418b1b
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 0x40c525
push dword [ebp + 0xc]
call fcn.00418b1b
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.004192a9
mov esp, ebp
pop ebp
ret