Function at 0x406030
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 0x597a1d
mov eax, dword fs:[0]
push eax
sub esp, 0xa4
mov eax, dword [0x6031c0]
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.0056f490
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.00405f50
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 0x406142
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x18], eax
jmp 0x40638b
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 0x4061db
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x18], eax
jmp 0x40638b
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 0x40620f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x18], eax
jmp 0x40638b
mov dword [ebp - 0x38], 0
cmp dword [ebp - 0xa4], 2
jne 0x406226
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 0x5ab18c
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 0x40625f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x18], eax
jmp 0x40638b
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 0x40628d
push 0
mov edx, dword [ebp - 0x14]
push edx
call dword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
mov dword [ebp - 0x28], eax
push 0x5ab1ac
lea ecx, [ebp + 0xc]
call fcn.00405df0
push eax
lea eax, [ebp - 0x2c]
push eax
call fcn.005731f9
add esp, 0xc
mov dword [ebp - 0x60], eax
cmp dword [ebp - 0x60], 0
je 0x4062be
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x18], eax
jmp 0x40638b
cmp dword [ebp - 0x28], 0
je 0x40638b
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 0x4062ef
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x18], eax
jmp 0x40638b
mov eax, dword [ebp - 0x10]
add eax, 1
push eax
call fcn.004373ac
add esp, 4
mov dword [ebp - 0x64], eax
mov ecx, dword [ebp - 0x64]
mov dword [ebp - 0x1c], ecx
cmp dword [ebp - 0x1c], 0
je 0x40637a
mov edx, dword [ebp - 0x10]
add edx, 1
push edx
push 0
mov eax, dword [ebp - 0x1c]
push eax
call fcn.0056f490
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 0x406359
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.0057cdd2
add esp, 0x10
mov edx, dword [ebp - 0x1c]
mov dword [ebp - 0x68], edx
mov eax, dword [ebp - 0x68]
push eax
call fcn.004373b5
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 0x406381
mov dword [ebp - 0x10], 0
cmp dword [ebp - 0x10], 0
ja 0x4062c8
cmp dword [ebp - 0x2c], 0
je 0x40639d
mov ecx, dword [ebp - 0x2c]
push ecx
call fcn.0057cb2f
add esp, 4
cmp dword [ebp - 0x14], 0
je 0x4063ad
mov edx, dword [ebp - 0x14]
push edx
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
cmp dword [ebp - 0x20], 0
je 0x4063bd
mov eax, dword [ebp - 0x20]
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
cmp dword [ebp - 0x24], 0
je 0x4063cd
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