Function at 0x40376c
Capabilities:
Initialize winhttp library
Prepare http request
Read http header
Receive http response
Reference http user-agent string

Disassembly:
push 0x80
mov eax, 0x455beb
call fcn.0042794e
xor ebx, ebx
lea ecx, [ebp - 0x10]
mov dword [ebp - 4], ebx
mov dword [ebp - 0x14], ebx
call fcn.004015de
lea ecx, [ebp - 0x20]
call fcn.004015de
lea ecx, [ebp - 0x24]
call fcn.004015de
jmp 0x403ad1
mov esi, dword [ebp - 0x78]
mov edi, dword [ebp - 0x7c]
call fcn.00419b6c
push eax
push esi
push edi
lea ecx, [ebp - 0x38]
call fcn.004013fd
lea eax, [ebp - 0x38]
mov byte [ebp - 4], 4
push eax
lea ecx, [ebp - 0x20]
call fcn.004016cc
mov ecx, dword [ebp - 0x38]
mov byte [ebp - 4], 3
lea ecx, [ecx - 0x10]
call fcn.0040538e
push dword [ebp - 0x60]
lea ecx, [ebp - 0x40]
call fcn.00401534
push eax
lea ecx, [ebp - 0x24]
mov byte [ebp - 4], 5
call fcn.004016cc
mov ecx, dword [ebp - 0x40]
mov byte [ebp - 4], 3
lea ecx, [ecx - 0x10]
call fcn.0040538e
push ebx
push ebx
push ebx
push ebx
push str.Mozilla_5.0__Windows_NT_10.0_
call dword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov dword [ebp - 0x28], eax
test eax, eax
je 0x403b1e
push 4
lea ecx, [ebp - 0x44]
mov dword [ebp - 0x44], ebx
push ecx
push 0x58
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpSetOption]
mov edi, dword [ebp - 0x24]
mov esi, dword [ebp - 0x20]
test eax, eax
je 0x403be3
push ebx
push dword [ebp - 0x74]
push esi
push dword [ebp - 0x28]
call dword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov dword [ebp - 0x34], eax
test eax, eax
je 0x403be3
cmp dword [ebp - 0x80], 2
mov edx, 0x800000
mov ecx, ebx
cmove ecx, edx
push ecx
push ebx
push ebx
push ebx
push edi
push 0x459c3c
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov dword [ebp - 0x18], eax
test eax, eax
je 0x403bd0
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
test eax, eax
je 0x403baf
push ebx
push dword [ebp - 0x18]
call dword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
test eax, eax
je 0x403baf
push 0x2f
pop eax
mov dword [ebp - 0x3c], ebx
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x30], eax
push ebx
lea ecx, [ebp - 0x14]
push ecx
push ebx
push ebx
push eax
push dword [ebp - 0x18]
call dword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x4038f8
mov eax, dword [ebp - 0x14]
xor ecx, ecx
push 2
shr eax, 1
pop edx
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0041962d
pop ecx
push ebx
lea ecx, [ebp - 0x14]
mov dword [ebp - 0x2c], eax
push ecx
push eax
push ebx
push dword [ebp - 0x30]
push dword [ebp - 0x18]
call dword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
cmp dword [ebp - 0x14], 0
jne 0x403917
mov ecx, dword [ebp - 0x3c]
push 0x21
pop eax
push 2
inc ecx
mov dword [ebp - 0x30], eax
pop edx
mov dword [ebp - 0x3c], ecx
cmp ecx, edx
jb 0x4038ac
jmp 0x403baf
push dword [ebp - 0x2c]
lea ecx, [ebp - 0x48]
call fcn.00401534
push eax
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 6
call fcn.004016cc
mov ecx, dword [ebp - 0x48]
mov byte [ebp - 4], 3
lea ecx, [ecx - 0x10]
call fcn.0040538e
push dword [ebp - 0x2c]
call fcn.00419636
cmp dword [ebp - 0x14], 0
pop ecx
je 0x403baf
cmp dword [ebp - 0x30], 0x21
jne 0x403ba3
push ebx
push 0x459bd0
lea ecx, [ebp - 0x10]
call fcn.00402f1b
cmp eax, 0xffffffff
je 0x403a19
push ebx
push 0x459a98
lea ecx, [ebp - 0x10]
call fcn.00402f1b
cmp eax, 0xffffffff
je 0x403a19
push ebx
push str..exe_
lea ecx, [ebp - 0x10]
call fcn.00402f1b
lea ecx, [ebp - 0x10]
push ebx
cmp eax, 0xffffffff
je 0x4039cc
push str..exe_
call fcn.00402f1b
add eax, 4
lea ecx, [ebp - 0x10]
push eax
lea eax, [ebp - 0x4c]
push eax
call fcn.0040444b
push eax
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 7
call fcn.004016cc
mov ecx, dword [ebp - 0x4c]
jmp 0x403a0d
push str..msi_
call fcn.00402f1b
cmp eax, 0xffffffff
je 0x403b5a
push ebx
push str..msi_
lea ecx, [ebp - 0x10]
call fcn.00402f1b
add eax, 4
lea ecx, [ebp - 0x10]
push eax
lea eax, [ebp - 0x50]
push eax
call fcn.0040444b
push eax
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 8
call fcn.004016cc
mov ecx, dword [ebp - 0x50]
lea ecx, [ecx - 0x10]
mov byte [ebp - 4], 3
call fcn.0040538e
push dword [ebp - 0x10]
call dword [sym.imp.SHLWAPI.dll_PathFindExtensionW]
push eax
lea ecx, [ebp - 0x1c]
call fcn.00401534
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 9
call fcn.00404ece
push str..exe
push dword [ebp - 0x1c]
call fcn.00405c8e
pop ecx
pop ecx
test eax, eax
je 0x403b86
push str..msi
push dword [ebp - 0x1c]
call fcn.00405c8e
pop ecx
pop ecx
test eax, eax
je 0x403b86
lea eax, [ebp - 0x10]
push eax
lea ecx, [ebp + 8]
call fcn.004016cc
push dword [ebp - 0x18]
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
push dword [ebp - 0x34]
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
push dword [ebp - 0x28]
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov ecx, dword [ebp - 0x1c]
lea ecx, [ecx - 0x10]
call fcn.0040538e
lea ecx, [edi - 0x10]
lea edi, [esi - 0x10]
mov esi, dword [ebp - 0x10]
add esi, 0xfffffff0
call fcn.0040538e
mov ecx, edi
call fcn.0040538e
mov ecx, esi
call fcn.0040538e
lea ecx, [ebp - 0x10]
mov dword [ebp - 0x14], ebx
call fcn.004015de
lea ecx, [ebp - 0x20]
call fcn.004015de
lea ecx, [ebp - 0x24]
call fcn.004015de
push 0x3c
pop esi
push esi
lea eax, [ebp - 0x8c]
mov byte [ebp - 4], 3
push ebx
push eax
call fcn.0042c6e0
or eax, 0xffffffff
mov dword [ebp - 0x8c], esi
add esp, 0xc
mov dword [ebp - 0x84], eax
mov dword [ebp - 0x78], eax
lea ecx, [ebp - 0x8c]
mov dword [ebp - 0x5c], eax
mov dword [ebp - 0x54], eax
mov eax, dword [ebp + 8]
push ecx
push ebx
push dword [eax - 0xc]
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpCrackUrl]
test eax, eax
jne 0x4037a0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, dword [ebp - 0x24]
mov ebx, eax
mov esi, dword [ebp - 0x20]
lea ecx, [edi - 0x10]
call fcn.0040538e
lea ecx, [esi - 0x10]
call fcn.0040538e
mov ecx, dword [ebp - 0x10]
lea ecx, [ecx - 0x10]
call fcn.0040538e
mov ecx, dword [ebp + 8]
lea ecx, [ecx - 0x10]
call fcn.0040538e
mov eax, ebx
call fcn.0042791c
ret
lea eax, [ebp - 0x10]
push eax
lea ecx, [ebp + 8]
call fcn.004016cc
push dword [ebp - 0x18]
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
push dword [ebp - 0x34]
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
push dword [ebp - 0x28]
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
jmp 0x403a97
mov ecx, dword [ebp + 0xc]
lea eax, [ebp - 0x10]
push eax
call fcn.004016cc
mov ecx, dword [ebp - 0x1c]
mov byte [ebp - 4], 3
lea ecx, [ecx - 0x10]
call fcn.0040538e
jmp 0x403baf
mov ecx, dword [ebp + 0xc]
lea eax, [ebp - 0x10]
push eax
call fcn.004016cc
mov ecx, dword [ebp + 0xc]
push 0x100000
push ebx
push ebx
call fcn.0040346d
push eax
call dword [sym.imp.SHLWAPI.dll_UrlUnescapeW]
push dword [ebp - 0x18]
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
jmp 0x403bd8
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
push dword [ebp - 0x34]
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
jmp 0x403beb
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
push dword [ebp - 0x28]
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
jmp 0x403b2c