Function at 0x402a70
Capabilities:
Check if file exists
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x83c
mov eax, dword [0x46b3ac]
push ebx
mov dword [esp + 0x83c], eax
push esi
push edi
xor esi, esi
xor eax, eax
mov word [esp + 0x20], si
mov ecx, 0x103
lea edi, [esp + 0x22]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
xor eax, eax
mov word [esp + 0x430], si
mov ecx, 0x103
lea edi, [esp + 0x432]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov edi, dword [ebp + 8]
lea eax, [esp + 0x20]
push edi
push eax
mov dword [esp + 0x18], esi
mov dword [esp + 0x1c], esi
mov dword [esp + 0x14], esi
mov dword [esp + 0x20], esi
call fcn.004318eb
lea ecx, [esp + 0x438]
push edi
push ecx
call fcn.004318eb
lea edx, [esp + 0x30]
push str.lately.idx
push edx
call fcn.004318c1
lea eax, [esp + 0x448]
push str.lately.dat
push eax
call fcn.004318c1
add esp, 0x20
lea ecx, [esp + 0x20]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
mov ebx, dword [sym.imp.KERNEL32.dll_WriteFile]
jne 0x402c5b
push esi
push 0x80
push 2
push esi
push 3
push 0x10000000
lea edx, [esp + 0x38]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x402c96
push 0
lea eax, [esp + 0x14]
push eax
push 2
lea ecx, [esp + 0x24]
push ecx
push esi
mov dword [esp + 0x2c], 0x2714
call ebx
push 0
lea edx, [esp + 0x14]
push edx
push 2
lea eax, [esp + 0x24]
push eax
push esi
mov dword [esp + 0x2c], 0x2711
call ebx
push 0
lea ecx, [esp + 0x14]
push ecx
push 4
lea edx, [esp + 0x20]
push edx
push esi
mov dword [esp + 0x28], 0
call ebx
push 0
lea eax, [esp + 0x14]
push eax
push 4
lea ecx, [esp + 0x20]
push ecx
push esi
call ebx
push 0x100000
mov dword [esp + 0x18], 0xc
mov dword [esp + 0x10], 0x100000
call fcn.0044ac64
mov ecx, dword [esp + 0x10]
mov edx, ecx
mov edi, eax
shr ecx, 2
xor eax, eax
mov dword [esp + 0x20], edi
rep stosd dword es:[edi], eax
add esp, 4
mov ecx, edx
push 0
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [esp + 0x18]
mov edi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
push eax
push esi
call edi
mov edx, dword [esp + 0xc]
mov eax, dword [esp + 0x1c]
push 0
lea ecx, [esp + 0x14]
push ecx
push edx
push eax
push esi
call ebx
push 0
push 0
push 4
push esi
call edi
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 0x14]
push 0
add eax, ecx
lea edx, [esp + 0x14]
push edx
mov dword [esp + 0x14], eax
push 4
lea eax, [esp + 0x18]
push eax
push esi
call ebx
push 0
push 0
push 8
push esi
call edi
push 0
lea ecx, [esp + 0x14]
push ecx
push 4
lea edx, [esp + 0x20]
push edx
push esi
call ebx
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x1c]
push eax
call fcn.0044ac5f
add esp, 4
xor esi, esi
lea ecx, [esp + 0x430]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x402d2a
push esi
push 0x80
push 2
push esi
push 3
push 0x10000000
lea edx, [esp + 0x448]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x402cad
xor eax, eax
mov ecx, dword [esp + 0x844]
call fcn.00431288
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
push 0x100000
mov dword [esp + 0x10], 0x100000
mov dword [esp + 0x18], 8
call fcn.0044ac64
mov ecx, dword [esp + 0x10]
mov edx, ecx
mov edi, eax
shr ecx, 2
xor eax, eax
mov dword [esp + 0x20], edi
rep stosd dword es:[edi], eax
add esp, 4
mov ecx, edx
and ecx, 3
push 0
rep stosb byte es:[edi], al
lea eax, [esp + 0x14]
push eax
push 4
lea ecx, [esp + 0x18]
push ecx
push esi
call ebx
push 0
lea edx, [esp + 0x14]
push edx
push 4
lea eax, [esp + 0x20]
push eax
push esi
call ebx
mov edx, dword [esp + 0xc]
mov edi, dword [esp + 0x1c]
push 0
lea ecx, [esp + 0x14]
push ecx
push edx
push edi
push esi
call ebx
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
call fcn.0044ac5f
add esp, 4
mov ecx, dword [esp + 0x844]
mov eax, 1
call fcn.00431288
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4