Function at 0x405c80
Capabilities:
Initialize winhttp library
Prepare http request
Receive http response
Reference http user-agent string
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x595ced
mov eax, dword fs:[0]
push eax
sub esp, 0xa4
mov eax, dword [0x6001c0]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 4], 1
mov eax, dword [ebp + 0x10]
mov dword [eax], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x14], 0
lea ecx, [ebp - 0x6c]
call fcn.00402220
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x34]
call fcn.00402220
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x30]
call fcn.00402220
mov byte [ebp - 4], 4
mov dword [ebp - 0x74], 0x2f
mov dword [ebp - 0x2c], 0
push 0x3c
push 0
lea ecx, [ebp - 0xb0]
push ecx
call fcn.0056eec0
add esp, 0xc
mov dword [ebp - 0xb0], 0x3c
mov dword [ebp - 0xa8], 0xffffffff
mov dword [ebp - 0x9c], 0xffffffff
mov dword [ebp - 0x80], 0xffffffff
mov dword [ebp - 0x78], 0xffffffff
lea ecx, [ebp + 8]
call fcn.00405ba0
mov dword [ebp - 0x40], eax
lea ecx, [ebp + 8]
call fcn.00402790
mov dword [ebp - 0x44], eax
lea edx, [ebp - 0xb0]
push edx
push 0
mov eax, dword [ebp - 0x40]
push eax
mov ecx, dword [ebp - 0x44]
push ecx
call dword [sym.imp.WINHTTP.dll_WinHttpCrackUrl]
test eax, eax
jne 0x405d92
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x18], eax
jmp 0x405fdb
mov edx, dword [ebp - 0x9c]
push edx
mov eax, dword [ebp - 0xa0]
push eax
lea ecx, [ebp - 0x50]
call fcn.00402140
mov dword [ebp - 0x48], eax
mov ecx, dword [ebp - 0x48]
mov dword [ebp - 0x4c], ecx
mov byte [ebp - 4], 5
mov edx, dword [ebp - 0x4c]
push edx
lea ecx, [ebp - 0x34]
call fcn.004025b0
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x50]
call fcn.004023e0
mov eax, dword [ebp - 0x84]
push eax
lea ecx, [ebp - 0x5c]
call fcn.004020c0
mov dword [ebp - 0x54], eax
mov ecx, dword [ebp - 0x54]
mov dword [ebp - 0x58], ecx
mov byte [ebp - 4], 6
mov edx, dword [ebp - 0x58]
push edx
lea ecx, [ebp - 0x30]
call fcn.004025b0
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x5c]
call fcn.004023e0
push 0
push 0
push 0
push 0
push str.Mozilla_5.0__Windows_NT_10.0_
call dword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0
jne 0x405e2b
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x18], eax
jmp 0x405fdb
push 0
movzx eax, word [ebp - 0x98]
push eax
lea ecx, [ebp - 0x34]
call fcn.00402790
push eax
mov ecx, dword [ebp - 0x24]
push ecx
call dword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0
jne 0x405e5f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x18], eax
jmp 0x405fdb
mov dword [ebp - 0x38], 0
cmp dword [ebp - 0xa4], 2
jne 0x405e76
mov dword [ebp - 0x38], 0x800000
mov edx, dword [ebp - 0x38]
push edx
push 0
push 0
push 0
lea ecx, [ebp - 0x30]
call fcn.00402790
push eax
push 0x5a90a4
mov eax, dword [ebp - 0x20]
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jne 0x405eaf
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x18], eax
jmp 0x405fdb
push 0
push 0
push 0
push 0
push 0
push 0
mov ecx, dword [ebp - 0x14]
push ecx
call dword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x28], 0
je 0x405edd
push 0
mov edx, dword [ebp - 0x14]
push edx
call dword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
mov dword [ebp - 0x28], eax
push 0x5a90c4
lea ecx, [ebp + 0xc]
call fcn.00405a40
push eax
lea eax, [ebp - 0x2c]
push eax
call fcn.00572c19
add esp, 0xc
mov dword [ebp - 0x60], eax
cmp dword [ebp - 0x60], 0
je 0x405f0e
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x18], eax
jmp 0x405fdb
cmp dword [ebp - 0x28], 0
je 0x405fdb
mov dword [ebp - 0x10], 0
lea ecx, [ebp - 0x10]
push ecx
mov edx, dword [ebp - 0x14]
push edx
call dword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
test eax, eax
jne 0x405f3f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x18], eax
jmp 0x405fdb
mov eax, dword [ebp - 0x10]
add eax, 1
push eax
call fcn.00436dcc
add esp, 4
mov dword [ebp - 0x64], eax
mov ecx, dword [ebp - 0x64]
mov dword [ebp - 0x1c], ecx
cmp dword [ebp - 0x1c], 0
je 0x405fca
mov edx, dword [ebp - 0x10]
add edx, 1
push edx
push 0
mov eax, dword [ebp - 0x1c]
push eax
call fcn.0056eec0
add esp, 0xc
mov dword [ebp - 0x3c], 0
lea ecx, [ebp - 0x3c]
push ecx
mov edx, dword [ebp - 0x10]
push edx
mov eax, dword [ebp - 0x1c]
push eax
mov ecx, dword [ebp - 0x14]
push ecx
call dword [sym.imp.WINHTTP.dll_WinHttpReadData]
test eax, eax
je 0x405fa9
mov edx, dword [ebp - 0x2c]
push edx
push 1
mov eax, dword [ebp - 0x3c]
push eax
mov ecx, dword [ebp - 0x1c]
push ecx
call fcn.0057bf42
add esp, 0x10
mov edx, dword [ebp - 0x1c]
mov dword [ebp - 0x68], edx
mov eax, dword [ebp - 0x68]
push eax
call fcn.00436dd5
add esp, 4
mov ecx, dword [ebp + 0x10]
mov edx, dword [ecx]
add edx, dword [ebp - 0x10]
mov eax, dword [ebp + 0x10]
mov dword [eax], edx
jmp 0x405fd1
mov dword [ebp - 0x10], 0
cmp dword [ebp - 0x10], 0
ja 0x405f18
cmp dword [ebp - 0x2c], 0
je 0x405fed
mov ecx, dword [ebp - 0x2c]
push ecx
call fcn.0057bc9f
add esp, 4
cmp dword [ebp - 0x14], 0
je 0x405ffd
mov edx, dword [ebp - 0x14]
push edx
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
cmp dword [ebp - 0x20], 0
je 0x40600d
mov eax, dword [ebp - 0x20]
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
cmp dword [ebp - 0x24], 0
je 0x40601d
mov ecx, dword [ebp - 0x24]
push ecx
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov edx, dword [ebp - 0x18]
mov dword [ebp - 0x70], edx
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x30]
call fcn.004023e0
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x34]
call fcn.004023e0
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x6c]
call fcn.004023e0
mov byte [ebp - 4], 0
lea ecx, [ebp + 8]
call fcn.004023e0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 0xc]
call fcn.004023e0
mov eax, dword [ebp - 0x70]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov esp, ebp
pop ebp
ret