Function at 0x4035f0
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 ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x418a78
mov eax, dword fs:[0]
push eax
sub esp, 0x2b0
mov eax, dword [0x4231e0]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, dword [ebp + 8]
xor eax, eax
mov dword [ebp - 0x298], edi
mov dword [ebp - 0x2a0], 0
mov dword [ebp - 0x24c], 7
mov dword [ebp - 0x250], 0
mov word [ebp - 0x260], ax
mov dword [ebp - 4], eax
lea eax, [ebp - 0x218]
push eax
push 0
push 0
push 0x8023
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
test eax, eax
je 0x40367f
lea eax, [ebp - 0x260]
mov ecx, edi
push eax
call fcn.004023c0
jmp 0x403a39
xor eax, eax
mov dword [ebp - 0x21c], 7
mov dword [ebp - 0x220], 0
mov word [ebp - 0x230], ax
mov byte [ebp - 4], 1
cmp word [ebp - 0x218], ax
jne 0x4036ad
xor ecx, ecx
jmp 0x4036c5
lea ecx, [ebp - 0x218]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4036b6
sub ecx, edx
sar ecx, 1
push ecx
lea eax, [ebp - 0x218]
push eax
lea ecx, [ebp - 0x230]
call fcn.00401cd0
push 8
push 0x41a3c4
mov ecx, eax
call fcn.00402ea0
cmp dword [ebp - 0x21c], 8
lea eax, [ebp - 0x230]
push 0
cmovae eax, dword [ebp - 0x230]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
push 3
push 0x41a3d8
lea ecx, [ebp - 0x230]
call fcn.00402ea0
cmp dword [ebp - 0x21c], 8
lea eax, [ebp - 0x230]
push 0
cmovae eax, dword [ebp - 0x230]
push 0x80
push 4
push 0
push 3
push 0xc0000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
mov dword [ebp - 0x2a4], esi
mov byte [ebp - 4], 2
cmp esi, 0xffffffff
jne 0x403766
lea eax, [ebp - 0x260]
mov ecx, edi
push eax
call fcn.004023c0
jmp 0x403a09
lea eax, [ebp - 0x2bc]
mov dword [ebp - 0x2ac], 0
push eax
push 0
push 1
push 0
push 2
xorps xmm0, xmm0
push esi
movdqu xmmword [ebp - 0x2bc], xmm0
call dword [sym.imp.KERNEL32.dll_LockFileEx]
test eax, eax
jne 0x4037a8
lea eax, [ebp - 0x260]
mov ecx, edi
push eax
call fcn.004023c0
jmp 0x4039fe
mov dword [ebp - 0x2a8], esi
mov dword [ebp - 0x234], 0xf
mov dword [ebp - 0x238], 0
mov byte [ebp - 0x248], 0
lea eax, [ebp - 0x29c]
mov byte [ebp - 4], 4
push eax
push esi
mov dword [ebp - 0x29c], 0
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, 0xffffffff
je 0x403852
cmp dword [ebp - 0x29c], 0
jne 0x403852
push eax
lea ecx, [ebp - 0x26c]
call fcn.00406d50
mov eax, dword [ebp - 0x268]
lea ecx, [ebp - 0x294]
mov edi, dword [ebp - 0x26c]
sub eax, edi
push 0
push ecx
push eax
push edi
push esi
mov byte [ebp - 4], 5
mov dword [ebp - 0x294], 0
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x403843
push dword [ebp - 0x268]
lea ecx, [ebp - 0x248]
push edi
call fcn.00406740
lea ecx, [ebp - 0x26c]
mov byte [ebp - 4], 4
call fcn.00405850
mov ecx, dword [ebp - 0x238]
test ecx, ecx
jne 0x403972
push 1
lea ecx, [ebp - 0x290]
call fcn.004013b0
lea ecx, [ebp - 0x278]
mov byte [ebp - 4], 6
push ecx
mov ecx, eax
call fcn.00403b90
lea ecx, [ebp - 0x290]
mov byte [ebp - 4], 8
call fcn.004024b0
cmp dword [ebp - 0x264], 8
lea ecx, [ebp - 0x278]
mov eax, dword [ebp - 0x268]
cmovae ecx, dword [ebp - 0x278]
lea eax, [ecx + eax*2]
lea ecx, [ebp - 0x278]
cmovae ecx, dword [ebp - 0x278]
push eax
push ecx
lea ecx, [ebp - 0x248]
call fcn.00403410
cmp dword [ebp - 0x234], 0x10
lea ecx, [ebp - 0x294]
push 0
push ecx
push dword [ebp - 0x238]
lea eax, [ebp - 0x248]
mov dword [ebp - 0x294], 0
cmovae eax, dword [ebp - 0x248]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x40395d
mov edi, dword [ebp - 0x298]
lea eax, [ebp - 0x260]
push eax
mov ecx, edi
call fcn.004023c0
lea ecx, [ebp - 0x278]
call fcn.004024b0
lea ecx, [ebp - 0x248]
call fcn.004024e0
push 0
push 1
push 0
push 0
push esi
call dword [sym.imp.KERNEL32.dll_UnlockFile]
test esi, esi
je 0x403942
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [ebp - 0x230]
call fcn.004024b0
lea ecx, [ebp - 0x260]
call fcn.004024b0
jmp 0x403a50
lea ecx, [ebp - 0x278]
mov byte [ebp - 4], 4
call fcn.004024b0
mov ecx, dword [ebp - 0x238]
cmp dword [ebp - 0x234], 0x10
lea eax, [ebp - 0x248]
cmovae eax, dword [ebp - 0x248]
add eax, ecx
cmp dword [ebp - 0x234], 0x10
lea ecx, [ebp - 0x248]
cmovae ecx, dword [ebp - 0x248]
push eax
push ecx
lea ecx, [ebp - 0x260]
call fcn.004033c0
mov edi, dword [ebp - 0x298]
lea eax, [ebp - 0x260]
push eax
mov ecx, edi
call fcn.004023c0
cmp dword [ebp - 0x234], 0x10
jb 0x4039d4
push dword [ebp - 0x248]
call fcn.004075f1
add esp, 4
push 0
push 1
push 0
push 0
push esi
mov dword [ebp - 0x234], 0xf
mov dword [ebp - 0x238], 0
mov byte [ebp - 0x248], 0
call dword [sym.imp.KERNEL32.dll_UnlockFile]
test esi, esi
je 0x403a09
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x21c], 8
jb 0x403a20
push dword [ebp - 0x230]
call fcn.004075f1
add esp, 4
xor eax, eax
mov dword [ebp - 0x21c], 7
mov dword [ebp - 0x220], eax
mov word [ebp - 0x230], ax
cmp dword [ebp - 0x24c], 8
jb 0x403a50
push dword [ebp - 0x260]
call fcn.004075f1
add esp, 4
mov eax, edi
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.00407df4
mov esp, ebp
pop ebp
ret