Function at 0x518710
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x631658
mov eax, dword fs:[0]
push eax
sub esp, 0x15c
mov eax, dword [0x717f80]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov eax, dword [ebp + 8]
lea ecx, [ebp - 0x20]
mov edi, dword [ebp + 0x10]
xorps xmm0, xmm0
mov dword [ebp - 0x164], eax
mov eax, dword [ebp + 0xc]
push esi
mov dword [ebp - 0x168], eax
movq qword [ebp - 0x20], xmm0
mov dword [ebp - 0x18], 0
call fcn.004c8230
lea ecx, [esi + 0x2c0]
mov dword [ebp - 4], 0
call fcn.004c73a0
test eax, eax
jne 0x51879b
mov eax, dword [edi]
mov ecx, edi
push dword [0x7151f0]
call dword [eax + 0x14]
mov byte [ebp - 0x15d], 0
jmp 0x5189fe
push 0x118
lea eax, [ebp - 0x15c]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea ecx, [ebp - 0x15c]
call fcn.00468d60
push edi
lea eax, [ebp - 0x15c]
mov byte [ebp - 4], 1
push eax
push dword [ebp - 0x164]
mov ecx, esi
call fcn.00517c00
test al, al
jne 0x5187f2
mov eax, dword [edi]
mov ecx, edi
push dword [0x7151f4]
call dword [eax + 0x14]
mov byte [ebp - 0x15d], 0
jmp 0x5189f3
cmp byte [esi + 0x2bc], 0
je 0x51881b
lea eax, [esi + 0x2c]
push eax
lea ecx, [ebp - 0x15c]
call fcn.0046be50
push eax
call fcn.005180e0
add esp, 8
test al, al
je 0x5188f2
push 0x6846bc
lea ecx, [ebp - 0x15c]
call fcn.0046be50
push eax
call fcn.004b16b0
add esp, 8
mov dword [ebp - 0x164], eax
test eax, eax
jne 0x51888e
cmp byte [esi + 0x2bc], al
je 0x51885e
lea eax, [esi + 0x2c]
push eax
lea ecx, [ebp - 0x15c]
call fcn.0046be50
push eax
call fcn.00518660
add esp, 8
mov eax, dword [edi]
mov ecx, edi
push str.Failed_to_open_file
call dword [eax + 0x14]
mov esi, dword [edi]
lea ecx, [ebp - 0x15c]
call fcn.0046be50
push eax
push str.filename
mov ecx, edi
call dword [esi + 0x2c]
mov byte [ebp - 0x15d], 0
jmp 0x5189f3
push 0
push 0xa
push eax
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fseek
add esp, 0xc
test eax, eax
je 0x5188fe
cmp byte [esi + 0x2bc], 0
je 0x5188c0
lea eax, [esi + 0x2c]
push eax
lea ecx, [ebp - 0x15c]
call fcn.0046be50
push eax
call fcn.00518660
add esp, 8
mov eax, dword [edi]
mov ecx, edi
push str.Failed_to_seek_to_position_in_cache_file.
call dword [eax + 0x14]
mov esi, dword [edi]
lea ecx, [ebp - 0x15c]
call fcn.0046be50
push eax
push str.filename
mov ecx, edi
call dword [esi + 0x2c]
push dword [ebp - 0x164]
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fclose
add esp, 4
mov byte [ebp - 0x15d], 0
jmp 0x5189f3
lea ecx, [ebp - 0x14]
call fcn.004a80e0
push dword [ebp - 0x168]
mov byte [ebp - 4], 2
call fcn.004a87e0
add esp, 4
mov dword [ebp - 0x24], 0
xorps xmm0, xmm0
lea ecx, [ebp - 0x3c]
fstp qword [ebp - 0x44]
movups xmmword [ebp - 0x3c], xmm0
movq qword [ebp - 0x2c], xmm0
call fcn.0049ead0
push 8
lea eax, [ebp - 0x44]
mov byte [ebp - 4], 3
push eax
lea ecx, [ebp - 0x3c]
call fcn.0049f210
call fcn.004777d0
test al, al
jne 0x518959
lea ecx, [ebp - 0x3c]
call fcn.004a4a60
push dword [ebp - 0x164]
lea ecx, [ebp - 0x3c]
push 1
push 8
call fcn.004a2ca0
push eax
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fwrite
push dword [ebp - 0x164]
mov dword [ebp - 0x168], eax
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fclose
add esp, 0x14
cmp byte [esi + 0x2bc], 0
je 0x5189a6
lea ecx, [esi + 0x2c]
push ecx
lea ecx, [ebp - 0x15c]
call fcn.0046be50
push eax
call fcn.00518660
add esp, 8
cmp dword [ebp - 0x168], 1
je 0x5189dc
mov eax, dword [edi]
mov ecx, edi
push str.Failed_to_update_cache_file.
call dword [eax + 0x14]
mov esi, dword [edi]
lea ecx, [ebp - 0x15c]
call fcn.0046be50
push eax
push str.filename
mov ecx, edi
call dword [esi + 0x2c]
mov byte [ebp - 0x15d], 0
jmp 0x5189e3
mov byte [ebp - 0x15d], 1
lea ecx, [ebp - 0x3c]
call fcn.0049ecf0
lea ecx, [ebp - 0x14]
call fcn.004a80f0
lea ecx, [ebp - 0x15c]
call fcn.00468df0
lea ecx, [ebp - 0x20]
call fcn.004c8300
mov al, byte [ebp - 0x15d]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00622073
mov esp, ebp
pop ebp
ret 0xc