Function at 0x403610
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 0x418f68
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 0x40369f
lea eax, [ebp - 0x260]
mov ecx, edi
push eax
call fcn.00402340
jmp 0x403a59
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 0x4036cd
xor ecx, ecx
jmp 0x4036e5
lea ecx, [ebp - 0x218]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4036d6
sub ecx, edx
sar ecx, 1
push ecx
lea eax, [ebp - 0x218]
push eax
lea ecx, [ebp - 0x230]
call fcn.00401c60
push 8
push 0x41a3d4
mov ecx, eax
call fcn.00402e20
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 0x41a3e8
lea ecx, [ebp - 0x230]
call fcn.00402e20
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 0x403786
lea eax, [ebp - 0x260]
mov ecx, edi
push eax
call fcn.00402340
jmp 0x403a29
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 0x4037c8
lea eax, [ebp - 0x260]
mov ecx, edi
push eax
call fcn.00402340
jmp 0x403a1e
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 0x403872
cmp dword [ebp - 0x29c], 0
jne 0x403872
push eax
lea ecx, [ebp - 0x26c]
call fcn.00406f70
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 0x403863
push dword [ebp - 0x268]
lea ecx, [ebp - 0x248]
push edi
call fcn.00403340
lea ecx, [ebp - 0x26c]
mov byte [ebp - 4], 4
call fcn.00403590
mov ecx, dword [ebp - 0x238]
test ecx, ecx
jne 0x403992
push 1
lea ecx, [ebp - 0x290]
call fcn.00401380
lea ecx, [ebp - 0x278]
mov byte [ebp - 4], 6
push ecx
mov ecx, eax
call fcn.00403bb0
lea ecx, [ebp - 0x290]
mov byte [ebp - 4], 8
call fcn.004035e0
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.004033d0
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 0x40397d
mov edi, dword [ebp - 0x298]
lea eax, [ebp - 0x260]
push eax
mov ecx, edi
call fcn.00402340
lea ecx, [ebp - 0x278]
call fcn.004035e0
lea ecx, [ebp - 0x248]
call fcn.00402430
push 0
push 1
push 0
push 0
push esi
call dword [sym.imp.KERNEL32.dll_UnlockFile]
test esi, esi
je 0x403962
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [ebp - 0x230]
call fcn.004035e0
lea ecx, [ebp - 0x260]
call fcn.004035e0
jmp 0x403a70
lea ecx, [ebp - 0x278]
mov byte [ebp - 4], 4
call fcn.004035e0
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.00403380
mov edi, dword [ebp - 0x298]
lea eax, [ebp - 0x260]
push eax
mov ecx, edi
call fcn.00402340
cmp dword [ebp - 0x234], 0x10
jb 0x4039f4
push dword [ebp - 0x248]
call fcn.00407821
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 0x403a29
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x21c], 8
jb 0x403a40
push dword [ebp - 0x230]
call fcn.00407821
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 0x403a70
push dword [ebp - 0x260]
call fcn.00407821
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.00408024
mov esp, ebp
pop ebp
ret