Function at 0x40d080
Capabilities:
Create directory
Get common file path
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x46e44c
mov eax, dword fs:[0]
push eax
sub esp, 0x478
mov eax, dword [0x487b30]
xor eax, ebp
mov dword [ebp - 0x14], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x474], ecx
mov eax, dword [ebp - 0x474]
mov ecx, dword [eax + 0xf4]
cmp dword [ecx + 0x6e14], 0
jle 0x40d462
push 0x104
lea edx, [ebp - 0x42c]
push edx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
push 0
push 0x80
push 3
push 0
push 1
push SysReAllocString
lea eax, [ebp - 0x42c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x430], eax
push 0
push 0
push 0x300000
mov ecx, dword [ebp - 0x430]
push ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea edx, [ebp - 0x42c]
push edx
lea ecx, [ebp - 0x220]
call fcn.004053d0
mov dword [ebp - 4], 0
push 0x5c
lea ecx, [ebp - 0x220]
call fcn.0040dbd0
mov dword [ebp - 0x434], eax
mov eax, dword [ebp - 0x434]
add eax, 1
push eax
lea ecx, [ebp - 0x460]
push ecx
lea ecx, [ebp - 0x220]
call fcn.00405580
mov dword [ebp - 0x478], eax
mov edx, dword [ebp - 0x478]
mov dword [ebp - 0x47c], edx
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x47c]
push eax
lea ecx, [ebp - 0x220]
call fcn.00443890
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x460]
call fcn.00443990
push 0x2e
lea ecx, [ebp - 0x220]
call fcn.0040dbd0
mov dword [ebp - 0x434], eax
mov ecx, dword [ebp - 0x434]
push ecx
lea edx, [ebp - 0x464]
push edx
lea ecx, [ebp - 0x220]
call fcn.0040dcd0
mov dword [ebp - 0x480], eax
mov eax, dword [ebp - 0x480]
mov dword [ebp - 0x484], eax
mov byte [ebp - 4], 2
mov ecx, dword [ebp - 0x484]
push ecx
lea ecx, [ebp - 0x220]
call fcn.00443890
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x464]
call fcn.00443990
push 0
push 0x1c
lea edx, [ebp - 0x21c]
push edx
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
lea ecx, [ebp - 0x438]
call fcn.004053b0
mov byte [ebp - 4], 3
mov eax, dword [ebp - 0x220]
push eax
lea ecx, [ebp - 0x21c]
push ecx
push str._s_s_
lea edx, [ebp - 0x438]
push edx
call fcn.00443940
add esp, 0x10
push 0
lea ecx, [ebp - 0x438]
call fcn.00419920
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov eax, dword [ebp - 0x474]
mov ecx, dword [eax + 0xf4]
mov edx, dword [ecx + 0x6e14]
mov dword [ebp - 0x10], edx
mov dword [ebp - 0x43c], 0
jmp 0x40d283
mov eax, dword [ebp - 0x43c]
add eax, 1
mov dword [ebp - 0x43c], eax
mov ecx, dword [ebp - 0x43c]
cmp ecx, dword [ebp - 0x10]
jge 0x40d434
push 0
lea edx, [ebp - 0x45c]
push edx
push 4
lea eax, [ebp - 0x458]
push eax
mov ecx, dword [ebp - 0x430]
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
push 0
lea edx, [ebp - 0x45c]
push edx
push 0x10
lea eax, [ebp - 0x454]
push eax
mov ecx, dword [ebp - 0x430]
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov edx, dword [ebp - 0x458]
push edx
call fcn.0044c542
add esp, 4
mov dword [ebp - 0x468], eax
mov eax, dword [ebp - 0x468]
mov dword [ebp - 0x444], eax
push 0
lea ecx, [ebp - 0x45c]
push ecx
mov edx, dword [ebp - 0x458]
push edx
mov eax, dword [ebp - 0x444]
push eax
mov ecx, dword [ebp - 0x430]
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
lea edx, [ebp - 0x454]
push edx
mov eax, dword [ebp - 0x43c]
add eax, 1
push eax
mov ecx, dword [ebp - 0x438]
push ecx
push str._s_d_s
mov edx, dword [ebp - 0x43c]
mov eax, dword [ebp - 0x474]
lea ecx, [eax + edx*4 + 0xfc]
push ecx
call fcn.00443940
add esp, 0x14
push 0
push 0x82
push 2
push 0
push 2
push 0x40000000
mov edx, dword [ebp - 0x43c]
mov eax, dword [ebp - 0x474]
lea ecx, [eax + edx*4 + 0xfc]
call fcn.00419920
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x440], eax
cmp dword [ebp - 0x440], 0
jne 0x40d3e3
push 0x47ae74
mov ecx, dword [ebp - 0x43c]
mov edx, dword [ebp - 0x474]
lea ecx, [edx + ecx*4 + 0xfc]
call fcn.00443af0
mov eax, dword [ebp - 0x43c]
sub eax, 1
mov dword [ebp - 0x43c], eax
mov ecx, dword [ebp - 0x10]
sub ecx, 1
mov dword [ebp - 0x10], ecx
mov edx, dword [ebp - 0x444]
mov dword [ebp - 0x46c], edx
mov eax, dword [ebp - 0x46c]
push eax
call fcn.0044c54d
add esp, 4
jmp 0x40d274
push 0
lea ecx, [ebp - 0x45c]
push ecx
mov edx, dword [ebp - 0x458]
push edx
mov eax, dword [ebp - 0x444]
push eax
mov ecx, dword [ebp - 0x440]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov edx, dword [ebp - 0x440]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x444]
mov dword [ebp - 0x470], eax
mov ecx, dword [ebp - 0x470]
push ecx
call fcn.0044c54d
add esp, 4
jmp 0x40d274
mov edx, dword [ebp - 0x430]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x438]
call fcn.00443990
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x220]
call fcn.00443990
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.004567ae
mov esp, ebp
pop ebp
ret