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

Disassembly:
push 0x80
mov eax, 0x57ab44
call fcn.0054d3c4
xor ebx, ebx
lea ecx, [ebp - 0x10]
mov dword [ebp - 4], ebx
mov dword [ebp - 0x14], ebx
call fcn.00401fc2
lea ecx, [ebp - 0x20]
call fcn.00401fc2
lea ecx, [ebp - 0x24]
call fcn.00401fc2
push 0x3c
pop edi
push edi
lea eax, [ebp - 0x8c]
mov byte [ebp - 4], 3
push ebx
push eax
call fcn.005525a0
or esi, 0xffffffff
mov dword [ebp - 0x8c], edi
mov dword [ebp - 0x84], esi
mov dword [ebp - 0x78], esi
mov dword [ebp - 0x5c], esi
mov dword [ebp - 0x54], esi
jmp 0x404792
push dword [ebp - 0x78]
lea ecx, [ebp - 0x3c]
push dword [ebp - 0x7c]
call fcn.00401f34
push eax
lea ecx, [ebp - 0x20]
mov byte [ebp - 4], 4
call fcn.004020eb
mov ecx, dword [ebp - 0x3c]
mov byte [ebp - 4], 3
lea ecx, [ecx - 0x10]
call fcn.00406137
push dword [ebp - 0x60]
lea ecx, [ebp - 0x40]
call fcn.00401ed2
push eax
lea ecx, [ebp - 0x24]
mov byte [ebp - 4], 5
call fcn.004020eb
mov ecx, dword [ebp - 0x40]
mov byte [ebp - 4], 3
lea ecx, [ecx - 0x10]
call fcn.00406137
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 0x4047b2
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 0x404877
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 0x404877
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 0x58c354
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov dword [ebp - 0x18], eax
test eax, eax
je 0x404864
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 0x404843
push ebx
push dword [ebp - 0x18]
call dword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
test eax, eax
je 0x404843
push 0x2f
pop eax
mov dword [ebp - 0x38], 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 0x40458a
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.0041a210
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 0x4045a9
mov ecx, dword [ebp - 0x38]
push 0x21
pop eax
push 2
inc ecx
mov dword [ebp - 0x30], eax
pop edx
mov dword [ebp - 0x38], ecx
cmp ecx, edx
jb 0x40453e
jmp 0x404843
push dword [ebp - 0x2c]
lea ecx, [ebp - 0x48]
call fcn.00401ed2
push eax
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 6
call fcn.004020eb
mov ecx, dword [ebp - 0x48]
mov byte [ebp - 4], 3
lea ecx, [ecx - 0x10]
call fcn.00406137
push dword [ebp - 0x2c]
call fcn.0041a219
cmp dword [ebp - 0x14], 0
pop ecx
je 0x404843
cmp dword [ebp - 0x30], 0x21
jne 0x404837
push ebx
push 0x58c2e8
lea ecx, [ebp - 0x10]
call fcn.00403b61
cmp eax, 0xffffffff
je 0x4046ab
push ebx
push 0x58c1b0
lea ecx, [ebp - 0x10]
call fcn.00403b61
cmp eax, 0xffffffff
je 0x4046ab
push ebx
push str..exe_
lea ecx, [ebp - 0x10]
call fcn.00403b61
lea ecx, [ebp - 0x10]
push ebx
cmp eax, 0xffffffff
je 0x40465e
push str..exe_
call fcn.00403b61
add eax, 4
lea ecx, [ebp - 0x10]
push eax
lea eax, [ebp - 0x4c]
push eax
call fcn.004050e0
push eax
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 7
call fcn.004020eb
mov ecx, dword [ebp - 0x4c]
jmp 0x40469f
push str..msi_
call fcn.00403b61
cmp eax, 0xffffffff
je 0x4047ee
push ebx
push str..msi_
lea ecx, [ebp - 0x10]
call fcn.00403b61
add eax, 4
lea ecx, [ebp - 0x10]
push eax
lea eax, [ebp - 0x50]
push eax
call fcn.004050e0
push eax
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 8
call fcn.004020eb
mov ecx, dword [ebp - 0x50]
lea ecx, [ecx - 0x10]
mov byte [ebp - 4], 3
call fcn.00406137
push dword [ebp - 0x10]
call dword [sym.imp.SHLWAPI.dll_PathFindExtensionW]
push eax
lea ecx, [ebp - 0x1c]
call fcn.00401ed2
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 9
call fcn.00405b96
lea eax, [ebp - 0x1c]
push str..exe
push eax
call fcn.00402189
pop ecx
pop ecx
test al, al
jne 0x40481a
lea eax, [ebp - 0x1c]
push str..msi
push eax
call fcn.00402189
pop ecx
pop ecx
test al, al
jne 0x40481a
lea eax, [ebp - 0x10]
push eax
lea ecx, [ebp + 8]
call fcn.004020eb
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.00406137
lea ecx, [edi - 0x10]
lea edi, [esi - 0x10]
mov esi, dword [ebp - 0x10]
add esi, 0xfffffff0
call fcn.00406137
mov ecx, edi
call fcn.00406137
mov ecx, esi
call fcn.00406137
lea ecx, [ebp - 0x10]
mov dword [ebp - 0x14], ebx
call fcn.00401fc2
lea ecx, [ebp - 0x20]
call fcn.00401fc2
lea ecx, [ebp - 0x24]
call fcn.00401fc2
push 0x3c
pop esi
push esi
lea eax, [ebp - 0x8c]
mov byte [ebp - 4], 3
push ebx
push eax
call fcn.005525a0
or eax, 0xffffffff
mov dword [ebp - 0x8c], esi
mov dword [ebp - 0x84], eax
mov dword [ebp - 0x78], eax
mov dword [ebp - 0x5c], eax
mov dword [ebp - 0x54], eax
mov eax, dword [ebp + 8]
lea ecx, [ebp - 0x8c]
add esp, 0xc
push ecx
push ebx
push dword [eax - 0xc]
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpCrackUrl]
test eax, eax
jne 0x40443d
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.00406137
lea ecx, [esi - 0x10]
call fcn.00406137
mov ecx, dword [ebp - 0x10]
lea ecx, [ecx - 0x10]
call fcn.00406137
mov ecx, dword [ebp + 8]
lea ecx, [ecx - 0x10]
call fcn.00406137
mov eax, ebx
call fcn.0054d392
ret
lea eax, [ebp - 0x10]
push eax
lea ecx, [ebp + 8]
call fcn.004020eb
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 0x40472b
mov ecx, dword [ebp + 0xc]
lea eax, [ebp - 0x10]
push eax
call fcn.004020eb
mov ecx, dword [ebp - 0x1c]
mov byte [ebp - 4], 3
lea ecx, [ecx - 0x10]
call fcn.00406137
jmp 0x404843
mov ecx, dword [ebp + 0xc]
lea eax, [ebp - 0x10]
push eax
call fcn.004020eb
mov ecx, dword [ebp + 0xc]
push 0x100000
push ebx
push ebx
call fcn.004040ba
push eax
call dword [sym.imp.SHLWAPI.dll_UrlUnescapeW]
push dword [ebp - 0x18]
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
jmp 0x40486c
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
push dword [ebp - 0x34]
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
jmp 0x40487f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
push dword [ebp - 0x28]
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
jmp 0x4047c0