Function at 0x4119f0
Capabilities:
Check http status code
Prepare http request
Read http header
Receive http response
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x485d80
mov eax, dword fs:[0]
push eax
mov eax, 0x8a78
call fcn.0046ae30
mov eax, dword [0x499100]
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 ecx, dword [ebp + 0x10]
mov ebx, dword [ebp + 0x18]
mov esi, dword [ebp + 8]
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x8a34], ecx
mov ecx, dword [ebp + 0x14]
mov dword [ebp - 0x8a30], ecx
mov dword [ebp - 0x8a28], ebx
lea ecx, [ebp - 0x220]
mov dword [ebp - 4], 0
mov dword [ebp - 0x8a70], ecx
xorps xmm0, xmm0
lea ecx, [ebp - 0xa20]
mov dword [ebp - 0x8a44], 0x489094
mov dword [ebp - 0x8a54], ecx
lea ecx, [ebp - 0x8a80]
push ecx
push 0
push 0
push eax
mov dword [ebp - 0x8a40], 0
movlpd qword [ebp - 0x8a7c], xmm0
mov dword [ebp - 0x8a74], 0
movlpd qword [ebp - 0x8a68], xmm0
movlpd qword [ebp - 0x8a60], xmm0
mov dword [ebp - 0x8a58], 0
movlpd qword [ebp - 0x8a4c], xmm0
mov dword [ebp - 0x8a80], 0x3c
mov dword [ebp - 0x8a6c], 0x100
mov dword [ebp - 0x8a50], 0x400
call dword [sym.imp.WINHTTP.dll_WinHttpCrackUrl]
xor eax, eax
mov edx, 0x1bb
cmp word [ebp - 0x8a68], dx
mov ecx, 1
cmove eax, ecx
shl eax, 0x17
add eax, 0x100
push eax
lea eax, [ebp - 0x8a44]
push eax
push 0
push 0
lea eax, [ebp - 0xa20]
push eax
push 0x4890a8
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov edi, eax
test edi, edi
jne 0x411b2b
mov dword [ebx], 0xfffffffd
jmp 0x411de7
mov ecx, dword [ebp - 0x8a30]
mov eax, ecx
push 0
push 0
push 0
neg eax
push 0
sbb eax, eax
push eax
push ecx
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
test eax, eax
je 0x411dcf
push 0
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
push 0
test eax, eax
mov dword [ebp - 0x8a38], 0x10
lea eax, [ebp - 0x8a38]
push eax
lea eax, [ebp - 0x20]
setne byte [ebp - 0x8a21]
push eax
push 0
push 0x13
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
test eax, eax
jne 0x411b9a
mov dword [ebx], 0xfffffffc
mov dword [ebp - 4], 3
jmp 0x411dde
xor eax, eax
push 0xa
push eax
mov word [ebp - 0x12], ax
lea eax, [ebp - 0x20]
push eax
call fcn.00473412
add esp, 0xc
mov dword [ebx], eax
cmp byte [ebp - 0x8a21], 0
je 0x411dbb
cmp eax, 0xc8
jne 0x411dbb
push 0
push 0
push 2
push 0
push 0
push 0x40000000
push dword [ebp - 0x8a34]
mov dword [ebp - 0x8a30], 0
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
test esi, esi
je 0x411d9c
cmp esi, 0xffffffff
je 0x411d9c
lea eax, [ebp - 0x8a2c]
mov dword [ebp - 0x8a2c], 0
push eax
push edi
mov ebx, 0x8000
call dword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
test eax, eax
je 0x411d80
mov eax, dword [ebp - 0x8a2c]
lea ecx, [ebp - 0x8a3c]
cmp eax, ebx
push ecx
cmova eax, ebx
push eax
mov dword [ebp - 0x8a2c], eax
lea eax, [ebp - 0x8a20]
push eax
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpReadData]
test eax, eax
je 0x411d64
mov ebx, dword [ebp - 0x8a3c]
test ebx, ebx
je 0x411d03
push 0
lea eax, [ebp - 0x8a34]
push eax
push ebx
lea eax, [ebp - 0x8a20]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x411d47
cmp dword [ebp - 0x8a34], ebx
jne 0x411d40
mov eax, dword [0x49b5e4]
movd xmm0, dword [0x49b5e0]
add eax, ebx
cvtdq2ps xmm0, xmm0
mov dword [0x49b5e4], eax
movd xmm1, eax
cvtdq2ps xmm1, xmm1
divss xmm1, xmm0
mulss xmm1, dword [0x489060]
cvttss2si eax, xmm1
cmp eax, dword [ebp - 0x8a30]
jle 0x411ce4
push 0
push eax
push 0x402
push 0x3e9
push dword [0x49b5d8]
mov dword [ebp - 0x8a30], eax
call dword [sym.imp.USER32.dll_SendDlgItemMessageW]
push 0
push dword [0x49b5e8]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x411d21
cmp dword [ebp - 0x8a2c], 0
ja 0x411c01
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
mov dword [ebp - 4], 0xa
call fcn.004074b0
add esp, 4
mov al, 1
jmp 0x411de9
mov eax, dword [ebp - 0x8a28]
push esi
mov dword [eax], 0xfffffff2
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 4], 9
jmp 0x411dde
mov ecx, 0xfffffff3
jmp 0x411d4c
mov ecx, 0xfffffff4
mov eax, dword [ebp - 0x8a28]
push esi
mov dword [eax], ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 4], 8
jmp 0x411dde
mov eax, dword [ebp - 0x8a28]
push esi
mov dword [eax], 0xfffffff7
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 4], 7
jmp 0x411dde
mov eax, dword [ebp - 0x8a28]
push esi
mov dword [eax], 0xfffffff8
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 4], 6
jmp 0x411dde
mov dword [ebx], 0xfffffff9
test esi, esi
je 0x411db2
cmp esi, 0xffffffff
je 0x411db2
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 4], 5
jmp 0x411dde
push edi
mov dword [ebp - 4], 4
call fcn.004074b0
add esp, 4
mov al, 1
jmp 0x411de9
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebx], eax
mov dword [ebp - 4], 2
push edi
call fcn.004074b0
add esp, 4
xor al, al
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.0046ae1f
mov esp, ebp
pop ebp
ret