Function at 0x40298b
Capabilities:
Create directory
Get common file path
Get file size
Get startup folder
Read file on windows
Write file on windows
Write file to startup folder

Disassembly:
push 0x2ac
mov eax, 0x41a651
call fcn.004093f0
mov ebx, dword [ebp + 8]
xor ecx, ecx
push 7
pop esi
xor eax, eax
mov dword [ebp - 0x2a0], ecx
mov dword [ebp - 0x264], esi
mov dword [ebp - 0x268], ecx
mov word [ebp - 0x278], ax
lea eax, [ebp - 0x218]
mov dword [ebp - 4], ecx
push eax
push ecx
push ecx
push 0x8023
push ecx
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
test eax, eax
je 0x4029f0
lea eax, [ebp - 0x278]
mov ecx, ebx
push eax
call fcn.00401418
push 0
push 1
jmp 0x402d3d
and dword [ebp - 0x250], 0
xor eax, eax
mov dword [ebp - 0x24c], esi
mov word [ebp - 0x260], ax
mov byte [ebp - 4], 1
cmp word [ebp - 0x218], ax
je 0x402a20
lea eax, [ebp - 0x218]
push eax
call fcn.004092e4
pop ecx
push eax
lea eax, [ebp - 0x218]
push eax
lea ecx, [ebp - 0x260]
call fcn.00402260
mov edi, 0x41c3e4
mov esi, eax
push edi
call fcn.004092e4
pop ecx
push eax
push edi
mov ecx, esi
call fcn.00401ff6
cmp dword [ebp - 0x24c], 8
lea eax, [ebp - 0x260]
cmovae eax, dword [ebp - 0x260]
xor edi, edi
push edi
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov esi, 0x41c3f8
push esi
call fcn.004092e4
pop ecx
push eax
push esi
lea ecx, [ebp - 0x260]
call fcn.00401ff6
cmp dword [ebp - 0x24c], 8
lea eax, [ebp - 0x260]
push edi
cmovae eax, dword [ebp - 0x260]
push 0x80
push 4
push edi
push 3
push 0xc0000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
mov dword [ebp - 0x29c], esi
mov byte [ebp - 4], 2
cmp esi, 0xffffffff
jne 0x402adf
lea eax, [ebp - 0x278]
mov ecx, ebx
push eax
call fcn.00401418
push edi
push 1
lea ecx, [ebp - 0x260]
call fcn.00401ee3
push edi
jmp 0x4029e9
xor eax, eax
lea edi, [ebp - 0x2b8]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
lea eax, [ebp - 0x2b8]
push eax
push 0
push 1
push 0
push 2
push esi
call dword [sym.imp.KERNEL32.dll_LockFileEx]
test eax, eax
jne 0x402b33
lea eax, [ebp - 0x278]
mov ecx, ebx
push eax
call fcn.00401418
test esi, esi
je 0x402b1f
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0
push 1
lea ecx, [ebp - 0x260]
call fcn.00401ee3
jmp 0x4029e7
mov dword [ebp - 0x2a4], esi
xor eax, eax
mov dword [ebp - 0x21c], 0xf
mov dword [ebp - 0x220], eax
mov byte [ebp - 0x230], al
mov dword [ebp - 0x298], eax
lea eax, [ebp - 0x298]
push eax
push esi
mov byte [ebp - 4], 4
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, 0xffffffff
je 0x402bdd
cmp dword [ebp - 0x298], 0
jne 0x402bdd
push eax
lea ecx, [ebp - 0x23c]
call fcn.00402944
mov eax, dword [ebp - 0x238]
lea ecx, [ebp - 0x294]
sub eax, dword [ebp - 0x23c]
xor edi, edi
push edi
push ecx
push eax
push dword [ebp - 0x23c]
mov byte [ebp - 4], 5
push esi
mov dword [ebp - 0x294], edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x402bcc
push dword [ebp - 0x238]
lea ecx, [ebp - 0x230]
push dword [ebp - 0x23c]
call fcn.00404e67
lea ecx, [ebp - 0x23c]
mov byte [ebp - 4], 4
call fcn.00403cbf
jmp 0x402bdf
xor edi, edi
mov ecx, dword [ebp - 0x220]
test ecx, ecx
jne 0x402cbf
push 1
lea ecx, [ebp - 0x290]
call fcn.00405356
lea ecx, [ebp - 0x248]
mov byte [ebp - 4], 6
push ecx
mov ecx, eax
call fcn.00402ede
push edi
push 1
lea ecx, [ebp - 0x290]
mov byte [ebp - 4], 8
call fcn.00401ee3
cmp dword [ebp - 0x234], 8
lea ecx, [ebp - 0x248]
mov eax, dword [ebp - 0x238]
cmovae ecx, dword [ebp - 0x248]
lea eax, [ecx + eax*2]
lea ecx, [ebp - 0x248]
cmovae ecx, dword [ebp - 0x248]
push eax
push ecx
lea ecx, [ebp - 0x230]
call fcn.00402885
cmp dword [ebp - 0x21c], 0x10
lea ecx, [ebp - 0x294]
push edi
push ecx
push dword [ebp - 0x220]
lea eax, [ebp - 0x230]
mov dword [ebp - 0x294], edi
cmovae eax, dword [ebp - 0x230]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x402ca7
lea eax, [ebp - 0x278]
mov ecx, ebx
push eax
call fcn.00401418
push edi
push 1
lea ecx, [ebp - 0x248]
call fcn.00401ee3
jmp 0x402d04
push edi
push 1
lea ecx, [ebp - 0x248]
mov byte [ebp - 4], 4
call fcn.00401ee3
mov ecx, dword [ebp - 0x220]
cmp dword [ebp - 0x21c], 0x10
lea eax, [ebp - 0x230]
cmovae eax, dword [ebp - 0x230]
add eax, ecx
cmp dword [ebp - 0x21c], 0x10
lea ecx, [ebp - 0x230]
cmovae ecx, dword [ebp - 0x230]
push eax
push ecx
lea ecx, [ebp - 0x278]
call fcn.00402853
lea eax, [ebp - 0x278]
mov ecx, ebx
push eax
call fcn.00401418
push edi
xor edi, edi
lea ecx, [ebp - 0x230]
inc edi
push edi
call fcn.00401e9f
xor eax, eax
push eax
push edi
push eax
push eax
push esi
call dword [sym.imp.KERNEL32.dll_UnlockFile]
test esi, esi
je 0x402d2c
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0
push edi
lea ecx, [ebp - 0x260]
call fcn.00401ee3
push 0
push edi
lea ecx, [ebp - 0x278]
call fcn.00401ee3
mov eax, ebx
call fcn.0040939f
ret