Function at 0x403120
Capabilities:
Get common file path
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x53b026
mov eax, dword fs:[0]
push eax
push ecx
mov eax, 0x16ec
call fcn.005246f0
mov eax, dword [0x59a1b0]
xor eax, ebp
mov dword [ebp - 0x18], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov edi, ecx
mov dword [ebp - 0x1650], edi
mov eax, dword [ebp + 0xc]
mov esi, dword [ebp + 8]
mov dword [ebp - 0x16a0], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x16a8], eax
xor eax, eax
push 0x206
push eax
mov word [ebp - 0x244], ax
lea eax, [ebp - 0x242]
push eax
mov dword [ebp - 0x1678], edi
call fcn.00522860
add esp, 0xc
lea ecx, [edi + 0x30]
xor eax, eax
xorps xmm0, xmm0
mov word [ebp - 0x38], ax
movdqu xmmword [ebp - 0x36], xmm0
push eax
push 0x57c5c8
movq qword [ebp - 0x26], xmm0
mov dword [ebp - 0x1e], eax
mov word [ebp - 0x1a], ax
call fcn.004029d0
cmp dword [edi + 4], 0
mov dword [edi + 0x20], 0
jne 0x4031de
sub esp, 8
mov ecx, edi
call fcn.00402ec0
test eax, eax
je 0x4032fe
push 0
push 0
push 2
push 1
mov dword [ebp - 4], 0
mov ecx, dword [edi + 4]
push esi
call fcn.00409423
mov esi, eax
mov dword [ebp - 4], 0xffffffff
mov dword [ebp - 0x164c], esi
mov dword [ebp - 0x1688], esi
call fcn.00406750
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x403227
push 0x80004005
call fcn.00402b10
mov eax, dword [edx]
mov ecx, edx
mov eax, dword [eax + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x1648], eax
push 0
lea eax, [ebp - 0x1648]
mov dword [ebp - 4], 2
push eax
push 5
mov ecx, esi
call fcn.00409669
push dword [ebp - 0x1648]
call fcn.00521822
add esp, 4
mov dword [edi + 0x34], eax
push 0
call fcn.00521343
add esp, 4
mov dword [ebp - 0x165c], eax
xorps xmm0, xmm0
mov dword [ebp - 0x1658], edx
lea eax, [ebp - 0x165c]
movsd qword [ebp - 0x1684], xmm0
lea ecx, [ebp - 0x16c0]
movsd qword [ebp - 0x16c0], xmm0
push eax
mov dword [ebp - 0x16b8], 0
call fcn.00403ff0
test esi, esi
je 0x403806
push 0x1000
push 0
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov dword [ebp - 0x1668], eax
test eax, eax
jne 0x40331e
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0x50]
mov eax, dword [esi]
mov ecx, esi
push 1
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
or ecx, 0xffffffff
mov edx, dword [ebp - 0x1648]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x4032fe
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x18]
xor ecx, ebp
call fcn.00520ffa
mov esp, ebp
pop ebp
ret 0x14
lea eax, [ebp - 0x244]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
lea eax, [ebp - 0x38]
push eax
call fcn.00403de0
lea edx, [ebp - 0x38]
mov esi, edx
mov edi, edi
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x403340
lea edi, [ebp - 0x244]
sub edx, esi
add edi, 0xfffffffe
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x403356
mov ecx, edx
lea eax, [ebp - 0x244]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
push 0
push 0
push 2
push 0
push 0
mov ecx, edx
and ecx, 3
push 0x40000000
rep movsb byte es:[edi], byte [esi]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x167c], eax
mov dword [ebp - 0x16a4], 0
call fcn.00406750
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x4033b8
push 0x80004005
call fcn.00402b10
mov eax, dword [edx]
mov ecx, edx
mov eax, dword [eax + 0xc]
call eax
lea esi, [eax + 0x10]
mov dword [ebp - 0x1664], esi
mov edi, dword [ebp - 0x1650]
xor eax, eax
movsd xmm1, qword [ebp - 0x1684]
mov byte [ebp - 4], 4
movsd xmm0, qword [0x57caa8]
movsd qword [ebp - 0x1694], xmm0
movsd xmm0, qword [0x57caa0]
movsd qword [ebp - 0x16e4], xmm0
movsd xmm0, qword [0x57ca98]
movsd qword [ebp - 0x16ec], xmm0
movsd xmm0, qword [0x57ca90]
movsd qword [ebp - 0x16fc], xmm0
movsd xmm0, qword [0x57ca88]
mov dword [ebp - 0x1660], eax
movsd qword [edi + 0x38], xmm1
mov dword [ebp - 0x1654], eax
movsd qword [ebp - 0x16d4], xmm0
nop
mov ecx, dword [ebp - 0x164c]
lea edx, [ebp - 0x1644]
push 0xfff
push edx
mov eax, dword [ecx]
mov eax, dword [eax + 0x38]
call eax
mov dword [ebp - 0x1650], eax
test eax, eax
je 0x40369f
push 0
lea ecx, [ebp - 0x16a4]
push ecx
push eax
lea eax, [ebp - 0x1644]
push eax
push dword [ebp - 0x167c]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [ebp - 0x1654]
add eax, dword [ebp - 0x1650]
push 0
mov dword [ebp - 0x1654], eax
call fcn.00521343
movsd xmm0, qword [ebp - 0x1684]
lea ecx, [ebp - 0x16b4]
add esp, 4
mov dword [ebp - 0x16cc], eax
lea eax, [ebp - 0x16cc]
mov dword [ebp - 0x16c8], edx
movsd qword [ebp - 0x16b4], xmm0
mov dword [ebp - 0x16ac], 0
push eax
call fcn.00403ff0
movsd xmm0, qword [ebp - 0x16b4]
movsd xmm2, qword [ebp - 0x1694]
comisd xmm0, xmm2
movsd qword [ebp - 0x165c], xmm0
ja 0x403538
fld qword [ebp - 0x16b4]
sub esp, 8
fstp qword [esp]
call fcn.00527be0
movsd xmm0, qword [ebp - 0x165c]
add esp, 8
movsd xmm2, qword [ebp - 0x1694]
fstp qword [ebp - 0x1674]
movsd xmm1, qword [ebp - 0x1674]
subsd xmm0, xmm1
subsd xmm1, xmm0
movsd qword [ebp - 0x165c], xmm1
movsd xmm1, qword [ebp - 0x16c0]
comisd xmm1, xmm2
movsd qword [ebp - 0x1674], xmm1
ja 0x403588
fld qword [ebp - 0x16c0]
sub esp, 8
fstp qword [esp]
call fcn.00527be0
movsd xmm0, qword [ebp - 0x1674]
add esp, 8
movsd xmm2, qword [ebp - 0x1694]
fstp qword [ebp - 0x169c]
movsd xmm1, qword [ebp - 0x169c]
subsd xmm0, xmm1
subsd xmm1, xmm0
movsd xmm0, qword [ebp - 0x165c]
subsd xmm0, xmm1
movsd xmm1, qword [ebp - 0x1684]
comisd xmm1, xmm0
jbe 0x4035a7
movaps xmm1, xmm2
jmp 0x4035af
movsd xmm1, qword [0x57ca80]
addsd xmm1, xmm0
mulsd xmm1, qword [ebp - 0x16e4]
movaps xmm0, xmm1
call fcn.0053ad1d
mov ecx, eax
call fcn.0053aebd
mov eax, dword [ebp - 0x1654]
movsd qword [ebp - 0x169c], xmm0
movd xmm0, eax
cvtdq2pd xmm0, xmm0
shr eax, 0x1f
addsd xmm0, qword [eax*8 + 0x57cab0]
movapd xmm1, xmm0
movsd qword [ebp - 0x165c], xmm0
movd xmm0, dword [edi + 0x34]
mulsd xmm1, qword [ebp - 0x16ec]
cvtdq2pd xmm0, xmm0
divsd xmm1, xmm0
movapd xmm0, xmm1
movsd qword [ebp - 0x1674], xmm1
subsd xmm0, qword [edi + 0x38]
comisd xmm0, xmmword [ebp - 0x16fc]
jb 0x40369f
push 0x1e
call dword [sym.imp.KERNEL32.dll_Sleep]
movsd xmm1, qword [ebp - 0x169c]
comisd xmm1, xmmword [ebp - 0x1684]
jbe 0x403675
movsd xmm0, qword [ebp - 0x165c]
sub esp, 8
mulsd xmm0, qword [ebp - 0x16d4]
divsd xmm0, xmm1
movsd qword [esp], xmm0
push str.Downloading_Files...___0.1f_Kb_s_
push dword [edi + 4]
movsd qword [edi + 0x10], xmm0
call fcn.00403cb0
add esp, 0x10
jmp 0x403692
push str.Downloading_Files...
push dword [edi + 4]
call fcn.00403cb0
movsd xmm0, qword [ebp - 0x165c]
add esp, 8
movsd qword [edi + 0x10], xmm0
movsd xmm0, qword [ebp - 0x1674]
movsd qword [edi + 0x38], xmm0
mov eax, dword [ebp - 0x1660]
inc eax
mov dword [ebp - 0x1660], eax
cmp eax, 0x3e8
jne 0x4036f4
cmp dword [esi - 4], 1
jle 0x4036cd
push dword [esi - 0xc]
lea ecx, [ebp - 0x1664]
call fcn.00402830
mov esi, dword [ebp - 0x1664]
movsd xmm0, qword [edi + 0x10]
sub esp, 8
movsd qword [esp], xmm0
push dword [ebp - 0x1654]
push esi
push dword [edi + 4]
call fcn.00403cb0
add esp, 0x14
xor eax, eax
mov dword [ebp - 0x1660], eax
cmp dword [ebp - 0x1650], 0
ja 0x403440
push dword [ebp - 0x167c]
mov dword [ebp - 4], 3
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0x164c]
lea eax, [edi + 0x20]
push eax
call fcn.004096e0
mov ecx, dword [ebp - 0x164c]
lea eax, [edi + 0x30]
push 0
push eax
push 0x15
call fcn.00409669
mov ecx, dword [ebp - 0x164c]
mov eax, dword [ecx]
call dword [eax + 0x50]
push dword [ebp - 0x1668]
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov ecx, dword [ebp - 0x164c]
push 1
mov eax, dword [ecx]
call dword [eax + 4]
lea edx, [esi - 0x10]
mov byte [ebp - 4], 2
or esi, 0xffffffff
lea ecx, [edx + 0xc]
mov eax, esi
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x403809
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x403809
or esi, 0xffffffff
push 0x57c5c8
push dword [edi + 4]
call fcn.00403cb0
lea edx, [ebp - 0x244]
add esp, 8
lea edi, [edx + 2]
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x403822
mov ecx, dword [ebp - 0x16a0]
lea eax, [ebp - 0x244]
sub edx, edi
sar edx, 1
push edx
push eax
call fcn.004029d0
lea edx, [ebp - 0x38]
lea edi, [edx + 2]
lea ebx, [ebx]
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x403850
mov ecx, dword [ebp - 0x16a8]
lea eax, [ebp - 0x38]
sub edx, edi
sar edx, 1
push edx
push eax
call fcn.004029d0
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x1648]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], esi
dec esi
test esi, esi
jg 0x403893
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, 1
jmp 0x403300