Function at 0x407b40
Capabilities:
Initialize winhttp library
Prepare http request
Read http header
Receive http response

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x56c41d
mov eax, dword fs:[0]
push eax
mov eax, 0x1850
call fcn.0054b810
mov eax, dword [0x5cefd4]
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 edi, ecx
mov dword [ebp - 4], 1
call fcn.004082e0
push 0x1800
lea eax, [ebp - 0x1810]
push 0
push eax
call fcn.0054d340
lea eax, [ebp - 0x410]
mov dword [ebp - 0x1850], 0
mov dword [ebp - 0x1828], eax
add esp, 0xc
lea eax, [ebp - 0x1410]
mov dword [ebp - 0x1844], 0
mov dword [ebp - 0x184c], eax
lea eax, [ebp - 0xc10]
mov dword [ebp - 0x1838], eax
lea eax, [ebp - 0x1810]
mov dword [ebp - 0x1858], eax
lea eax, [ebp - 0x810]
mov dword [ebp - 0x1830], eax
lea eax, [ebp - 0x1010]
mov dword [ebp - 0x1840], eax
lea eax, [ebp - 0x185c]
push eax
push SysReAllocString
push 0
push dword [ebp + 8]
mov dword [ebp - 0x185c], 0x3c
mov dword [ebp - 0x183c], 0x200
mov dword [ebp - 0x182c], 0x200
mov dword [ebp - 0x1854], 0x200
mov dword [ebp - 0x1834], 0x200
mov dword [ebp - 0x1848], 0x200
mov dword [ebp - 0x1824], 0x200
call dword [sym.imp.WINHTTP.dll_WinHttpCrackUrl]
or ebx, 0xffffffff
test eax, eax
jne 0x407d09
lea eax, [ebp + 8]
push eax
lea eax, [ebp - 0x1814]
push 0x5b07a8
push eax
call fcn.00408370
add esp, 0xc
mov byte [ebp - 4], 2
mov ecx, dword [eax]
mov esi, dword [edi + 8]
sub esi, 0x10
lea eax, [ecx - 0x10]
mov dword [ebp - 0x1818], eax
cmp eax, esi
je 0x407cdc
cmp dword [esi + 0xc], 0
jl 0x407cd0
mov eax, dword [ecx - 0x10]
cmp eax, dword [esi]
jne 0x407cd0
push dword [ebp - 0x1818]
call fcn.00403e90
add esp, 4
mov dword [ebp - 0x1818], eax
mov ecx, ebx
lea edx, [esi + 0xc]
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x407cc8
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0x1818]
add eax, 0x10
mov dword [edi + 8], eax
jmp 0x407cdc
push dword [ecx - 0xc]
push ecx
lea ecx, [edi + 8]
call fcn.00403c90
mov byte [ebp - 4], 1
mov eax, ebx
mov edx, dword [ebp - 0x1814]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x407cfd
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, edi
call fcn.004082e0
jmp 0x408280
push 0
push 0
push 0
push 1
push 0
call dword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov dword [edi + 0x18], eax
test eax, eax
jne 0x407dd3
lea eax, [ebp + 8]
push eax
lea eax, [ebp - 0x1818]
push 0x5b07c0
push eax
call fcn.00408370
add esp, 0xc
mov byte [ebp - 4], 3
mov ecx, dword [eax]
mov esi, dword [edi + 8]
sub esi, 0x10
lea eax, [ecx - 0x10]
mov dword [ebp - 0x1814], eax
cmp eax, esi
je 0x407da6
cmp dword [esi + 0xc], 0
jl 0x407d9a
mov eax, dword [ecx - 0x10]
cmp eax, dword [esi]
jne 0x407d9a
push dword [ebp - 0x1814]
call fcn.00403e90
add esp, 4
mov dword [ebp - 0x1814], eax
mov ecx, ebx
lea edx, [esi + 0xc]
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x407d92
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0x1814]
add eax, 0x10
mov dword [edi + 8], eax
jmp 0x407da6
push dword [ecx - 0xc]
push ecx
lea ecx, [edi + 8]
call fcn.00403c90
mov byte [ebp - 4], 1
mov eax, ebx
mov edx, dword [ebp - 0x1818]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x407dc7
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, edi
call fcn.004082e0
jmp 0x408280
push 0
push dword [ebp - 0x1844]
push dword [ebp - 0x184c]
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov dword [edi + 0x14], eax
test eax, eax
jne 0x407ea2
lea eax, [ebp + 8]
push eax
lea eax, [ebp - 0x1818]
push 0x5b07dc
push eax
call fcn.00408370
add esp, 0xc
mov byte [ebp - 4], 4
mov ecx, dword [eax]
mov esi, dword [edi + 8]
sub esi, 0x10
lea eax, [ecx - 0x10]
mov dword [ebp - 0x1814], eax
cmp eax, esi
je 0x407e75
cmp dword [esi + 0xc], 0
jl 0x407e69
mov eax, dword [ecx - 0x10]
cmp eax, dword [esi]
jne 0x407e69
push dword [ebp - 0x1814]
call fcn.00403e90
add esp, 4
mov dword [ebp - 0x1814], eax
mov ecx, ebx
lea edx, [esi + 0xc]
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x407e61
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0x1814]
add eax, 0x10
mov dword [edi + 8], eax
jmp 0x407e75
push dword [ecx - 0xc]
push ecx
lea ecx, [edi + 8]
call fcn.00403c90
mov byte [ebp - 4], 1
mov eax, ebx
mov edx, dword [ebp - 0x1818]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x407e96
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, edi
call fcn.004082e0
jmp 0x408280
push 0x100
push 0
push 0
push str.HTTP_1.1
push dword [ebp - 0x1830]
mov dword [ebp - 0x1820], 4
push str.HEAD
push eax
mov dword [ebp - 0x181c], 0
call dword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov dword [edi + 0x10], eax
test eax, eax
jne 0x407f90
lea eax, [ebp + 8]
push eax
lea eax, [ebp - 0x1818]
push 0x5b0818
push eax
call fcn.00408370
add esp, 0xc
mov byte [ebp - 4], 5
mov ecx, dword [eax]
mov esi, dword [edi + 8]
sub esi, 0x10
lea eax, [ecx - 0x10]
mov dword [ebp - 0x1814], eax
cmp eax, esi
je 0x407f63
cmp dword [esi + 0xc], 0
jl 0x407f57
mov eax, dword [ecx - 0x10]
cmp eax, dword [esi]
jne 0x407f57
push dword [ebp - 0x1814]
call fcn.00403e90
add esp, 4
mov dword [ebp - 0x1814], eax
mov ecx, ebx
lea edx, [esi + 0xc]
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x407f4f
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0x1814]
add eax, 0x10
mov dword [edi + 8], eax
jmp 0x407f63
push dword [ecx - 0xc]
push ecx
lea ecx, [edi + 8]
call fcn.00403c90
mov byte [ebp - 4], 1
mov eax, ebx
mov edx, dword [ebp - 0x1818]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x407f84
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, edi
call fcn.004082e0
jmp 0x408280
push 0
push 0
push 0
push 0
push 0
push 0
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
push 0
push dword [edi + 0x10]
call dword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
lea eax, [ebp - 0x181c]
push eax
lea eax, [ebp - 0x1820]
push eax
lea esi, [edi + 0x20]
push esi
push 0
push 0x20000005
push dword [edi + 0x10]
call dword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
push dword [edi + 0x10]
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
cmp dword [esi], 1
jae 0x408091
lea eax, [ebp + 8]
push eax
lea eax, [ebp - 0x1818]
push 0x5b0830
push eax
call fcn.00408370
add esp, 0xc
mov byte [ebp - 4], 6
mov ecx, dword [eax]
mov esi, dword [edi + 8]
sub esi, 0x10
lea eax, [ecx - 0x10]
mov dword [ebp - 0x1814], eax
cmp eax, esi
je 0x408064
cmp dword [esi + 0xc], 0
jl 0x408058
mov eax, dword [ecx - 0x10]
cmp eax, dword [esi]
jne 0x408058
push dword [ebp - 0x1814]
call fcn.00403e90
add esp, 4
mov dword [ebp - 0x1814], eax
mov ecx, ebx
lea edx, [esi + 0xc]
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x408050
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0x1814]
add eax, 0x10
mov dword [edi + 8], eax
jmp 0x408064
push dword [ecx - 0xc]
push ecx
lea ecx, [edi + 8]
call fcn.00403c90
mov byte [ebp - 4], 1
mov eax, ebx
mov edx, dword [ebp - 0x1818]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x408085
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, edi
call fcn.004082e0
jmp 0x408280
push 0x100
push 0
push 0
push str.HTTP_1.1
push dword [ebp - 0x1830]
push 0x5b084c
push dword [edi + 0x14]
call dword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov dword [edi + 0x10], eax
test eax, eax
jne 0x40816d
lea eax, [ebp + 8]
push eax
lea eax, [ebp - 0x1818]
push 0x5b0854
push eax
call fcn.00408370
add esp, 0xc
mov byte [ebp - 4], 7
mov ecx, dword [eax]
mov esi, dword [edi + 8]
sub esi, 0x10
lea eax, [ecx - 0x10]
mov dword [ebp - 0x1814], eax
cmp eax, esi
je 0x408140
cmp dword [esi + 0xc], 0
jl 0x408134
mov eax, dword [ecx - 0x10]
cmp eax, dword [esi]
jne 0x408134
push dword [ebp - 0x1814]
call fcn.00403e90
add esp, 4
mov dword [ebp - 0x1814], eax
mov ecx, ebx
lea edx, [esi + 0xc]
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40812c
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0x1814]
add eax, 0x10
mov dword [edi + 8], eax
jmp 0x408140
push dword [ecx - 0xc]
push ecx
lea ecx, [edi + 8]
call fcn.00403c90
mov byte [ebp - 4], 1
mov eax, ebx
mov edx, dword [ebp - 0x1818]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x408161
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, edi
call fcn.004082e0
jmp 0x408280
push 0
push 0
push 0
push 0
push 0
push 0
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
push 0
push dword [edi + 0x10]
call dword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
push 0x8000
call fcn.0040847f
add esp, 4
mov dword [edi + 0x24], eax
test eax, eax
jne 0x4081ba
push 6
lea ecx, [edi + 8]
push 0x5b0870
call fcn.00403c90
mov ecx, edi
call fcn.004082e0
jmp 0x408280
push 0
push 0x80
push 2
push 0
push 1
push 0x40000000
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [edi + 0xc], eax
test eax, eax
jne 0x408279
lea eax, [ebp + 0xc]
push eax
lea eax, [ebp - 0x1818]
push 0x5b0880
push eax
call fcn.00408370
add esp, 0xc
mov byte [ebp - 4], 8
mov ecx, dword [eax]
mov esi, dword [edi + 8]
sub esi, 0x10
lea edx, [ecx - 0x10]
cmp edx, esi
je 0x408256
cmp dword [esi + 0xc], 0
jl 0x40824a
mov eax, dword [edx]
cmp eax, dword [esi]
jne 0x40824a
push edx
call fcn.00403e90
add esp, 4
mov dword [ebp - 0x1814], eax
mov ecx, ebx
lea edx, [esi + 0xc]
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x408242
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0x1814]
add eax, 0x10
mov dword [edi + 8], eax
jmp 0x408256
push dword [ecx - 0xc]
push ecx
lea ecx, [edi + 8]
call fcn.00403c90
mov byte [ebp - 4], 1
mov eax, ebx
mov edx, dword [ebp - 0x1818]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x408280
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x408280
mov dword [edi + 4], 1
mov byte [ebp - 4], 0
mov eax, ebx
mov edx, dword [ebp + 8]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40829e
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp + 0xc]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], ebx
dec ebx
test ebx, ebx
jg 0x4082bd
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 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.0054aef3
mov esp, ebp
pop ebp
ret 8