Function at 0x413e16
Capabilities:
Get common file path
Get disk information
Get file size
Read file on windows
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0xac]
sub esp, 0x12c
mov eax, dword [0x46a860]
xor eax, ebp
mov dword [ebp + 0xa8], eax
mov eax, dword [ebp + 0xb4]
push ebx
push esi
push edi
mov edi, dword [ebp + 0xc0]
xor ebx, ebx
cmp eax, ebx
mov dword [ebp - 0x70], eax
mov dword [ebp - 0x64], edi
je 0x414483
cmp edi, ebx
je 0x414483
cmp byte [eax], bl
jne 0x413e69
push 0x57
call dword [sym.imp.KERNEL32.DLL_SetLastError]
jmp 0x41448f
push 4
lea eax, [ebp - 0x80]
push ebx
push eax
mov dword [ebp - 0x74], ebx
call fcn.004376d0
mov eax, dword [ebp - 0x70]
push 2
pop esi
push esi
inc eax
push 0x454774
push eax
call fcn.00437bcb
add esp, 0x18
test eax, eax
jne 0x413e99
push 3
push dword [ebp - 0x70]
jmp 0x413eae
lea eax, [ebp - 0x5c]
push eax
push 0x104
call dword [sym.imp.KERNEL32.DLL_GetCurrentDirectoryA]
push 3
lea eax, [ebp - 0x5c]
push eax
lea eax, [ebp - 0x80]
push eax
call fcn.004377d0
add esp, 0xc
lea eax, [ebp - 0x80]
push eax
call dword [sym.imp.KERNEL32.DLL_GetDriveTypeA]
cmp eax, 5
jne 0x413ece
mov dword [ebp - 0x74], esi
jmp 0x413ede
test byte [ebp + 0xbc], 2
je 0x413ede
mov dword [ebp - 0x74], 1
test byte [ebp + 0xbc], 1
je 0x413ef1
test byte [ebp - 0x74], 2
je 0x41448f
test byte [ebp + 0xc4], 0x20
je 0x413f03
mov dword [ebp - 0x6c], 4
jmp 0x413f22
test byte [ebp + 0xc4], 8
je 0x413f11
mov dword [ebp - 0x6c], esi
jmp 0x413f22
movzx eax, byte [ebp + 0xc4]
and eax, 4
or eax, esi
shr eax, 1
mov dword [ebp - 0x6c], eax
test byte [ebp + 0xc4], 0x10
je 0x413f5a
test byte [ebp + 0xc4], 4
jne 0x413f3e
push 0x8520006c
jmp 0x413e5e
mov eax, 0x8000
test dword [ebp + 0xc4], eax
mov dword [ebp - 0x60], SysStringLen
je 0x413f6b
xor dword [ebp + 0xc4], eax
jmp 0x413f6b
or dword [ebp + 0xc4], 0x8000
mov dword [ebp - 0x60], 0xc0000000
mov esi, dword [ebp - 0x60]
push ebx
push ebx
push dword [ebp - 0x6c]
shr esi, 0x1e
push ebx
not esi
and esi, 1
push esi
push dword [ebp - 0x60]
push dword [ebp - 0x70]
call dword [sym.imp.KERNEL32.DLL_CreateFileA]
lea ecx, [ebp - 0x68]
mov edi, eax
call fcn.0041370a
cmp edi, 0xffffffff
jne 0x413fe1
push ebx
push ebx
push dword [ebp - 0x70]
call fcn.004138eb
add esp, 0xc
push eax
lea ecx, [ebp - 0x68]
mov dword [ebp - 0x7c], eax
call fcn.00413dff
push dword [ebp - 0x7c]
mov edi, eax
push edi
push dword [ebp - 0x70]
call fcn.004138eb
add esp, 0xc
push ebx
push ebx
push dword [ebp - 0x6c]
mov dword [ebp - 0x70], edi
push ebx
push esi
push dword [ebp - 0x60]
push edi
call dword [sym.imp.KERNEL32.DLL_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
je 0x414467
mov eax, dword [0x46d644]
lea eax, [eax*4 + 4]
push eax
call fcn.00413dde
cmp eax, ebx
mov dword [ebp - 0x60], eax
jne 0x414013
push edi
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
mov eax, dword [ebp - 0x64]
lea ecx, [ebp - 0x68]
mov dword [eax], ebx
call fcn.00413710
jmp 0x414491
mov esi, dword [sym.imp.KERNEL32.DLL_GetFileSize]
push ebx
push edi
call esi
test eax, eax
jne 0x414181
test byte [ebp + 0xc4], 0x10
jne 0x414181
push 0x174
mov dword [ebp - 0x6c], ebx
call fcn.00413dde
mov esi, eax
cmp esi, ebx
jne 0x41404f
push dword [ebp - 0x60]
call fcn.004136f6
jmp 0x413ffa
push 4
push dword [0x468010]
lea eax, [esi + 0x124]
push eax
call fcn.004377d0
mov eax, dword [ebp + 0xcc]
add esp, 0xc
test eax, 0xffff0000
push 0x20
pop ecx
mov dword [esi + 0x128], ecx
mov word [esi + 0x140], bx
je 0x41408e
mov word [esi + 0x142], 3
jmp 0x414095
mov word [esi + 0x142], ax
xor eax, eax
inc eax
cmp dword [ebp + 0xc8], eax
jbe 0x4140aa
add eax, eax
cmp eax, dword [ebp + 0xc8]
jb 0x4140a0
lea edx, [eax + 2]
mov dword [esi + 0x138], eax
shl edx, 4
inc eax
shl eax, 5
push ebx
mov dword [esi + 0x12c], eax
lea eax, [ebp - 0x78]
push eax
push ecx
lea eax, [esi + 0x124]
push eax
push edi
mov dword [esi + 0x13c], ebx
mov dword [esi + 0x130], ecx
mov dword [esi + 0x134], edx
call dword [sym.imp.KERNEL32.DLL_WriteFile]
test eax, eax
jne 0x4140f8
push dword [ebp - 0x60]
call fcn.004136f6
push esi
jmp 0x414048
mov eax, dword [esi + 0x12c]
mov dword [ebp - 0x7c], eax
mov eax, dword [esi + 0x138]
shl eax, 4
push eax
call fcn.00413dde
cmp eax, ebx
mov dword [esi + 0x118], eax
je 0x4140ea
mov ecx, dword [esi + 0x138]
shl ecx, 4
push ecx
push 0xff
push eax
call fcn.004376d0
push dword [0x46d520]
mov eax, dword [esi + 0x138]
shl eax, 4
push eax
push dword [esi + 0x118]
call fcn.00413c11
add esp, 0x18
push ebx
lea eax, [ebp - 0x78]
push eax
mov eax, dword [esi + 0x138]
shl eax, 4
push eax
push dword [esi + 0x118]
push edi
call dword [sym.imp.KERNEL32.DLL_WriteFile]
test eax, eax
jne 0x4142f6
push dword [esi + 0x118]
call fcn.004136f6
jmp 0x4140ea
push edi
call fcn.00413838
cmp eax, 0xffffffff
mov dword [ebp - 0x6c], eax
jne 0x4141ae
push dword [ebp - 0x60]
call fcn.004136f6
push edi
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
push 0x85200065
call dword [sym.imp.KERNEL32.DLL_SetLastError]
jmp 0x414001
push ebx
push edi
call esi
push 0x174
mov dword [ebp - 0x7c], eax
call fcn.00413dde
mov esi, eax
cmp esi, ebx
je 0x414045
push ebx
push ebx
push dword [ebp - 0x6c]
push edi
call dword [sym.imp.KERNEL32.DLL_SetFilePointer]
push ebx
lea ecx, [ebp - 0x78]
push ecx
push 0x20
lea eax, [esi + 0x124]
push eax
push edi
call dword [sym.imp.KERNEL32.DLL_ReadFile]
test eax, eax
je 0x4140ea
mov eax, dword [esi + 0x138]
shl eax, 4
push eax
call fcn.00413dde
cmp eax, ebx
mov dword [esi + 0x118], eax
je 0x4140ea
mov eax, dword [esi + 0x13c]
cmp eax, ebx
je 0x414230
shl eax, 4
push eax
call fcn.00413dde
cmp eax, ebx
mov dword [esi + 0x11c], eax
je 0x414171
mov eax, dword [esi + 0x130]
add eax, dword [ebp - 0x6c]
push ebx
push ebx
push eax
push edi
call dword [sym.imp.KERNEL32.DLL_SetFilePointer]
push ebx
lea eax, [ebp - 0x78]
push eax
mov eax, dword [esi + 0x138]
shl eax, 4
push eax
push dword [esi + 0x118]
push edi
call dword [sym.imp.KERNEL32.DLL_ReadFile]
test eax, eax
jne 0x41427c
mov eax, dword [esi + 0x11c]
cmp eax, ebx
je 0x414171
push eax
call fcn.004136f6
jmp 0x414171
cmp dword [esi + 0x13c], ebx
je 0x4142f6
mov eax, dword [esi + 0x134]
add eax, dword [ebp - 0x6c]
push ebx
push ebx
push eax
push edi
call dword [sym.imp.KERNEL32.DLL_SetFilePointer]
push ebx
lea eax, [ebp - 0x78]
push eax
mov eax, dword [esi + 0x13c]
shl eax, 4
push eax
push dword [esi + 0x11c]
push edi
call dword [sym.imp.KERNEL32.DLL_ReadFile]
test eax, eax
jne 0x4142f6
push dword [esi + 0x11c]
call fcn.004136f6
push dword [esi + 0x118]
call fcn.004136f6
push dword [ebp - 0x60]
call fcn.004136f6
push esi
call fcn.004136f6
push edi
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
mov eax, dword [ebp - 0x64]
mov dword [eax], ebx
lea ecx, [ebp - 0x68]
call fcn.00413710
mov eax, ebx
jmp 0x414493
push dword [0x46d520]
mov eax, dword [esi + 0x138]
shl eax, 4
push eax
push dword [esi + 0x118]
call fcn.00413c74
mov eax, dword [esi + 0x11c]
add esp, 0xc
cmp eax, ebx
je 0x414337
push dword [0x46d524]
mov ecx, dword [esi + 0x13c]
shl ecx, 4
push ecx
push eax
call fcn.00413c74
add esp, 0xc
push 0x103
push dword [ebp - 0x70]
mov dword [esi + 0x144], esi
push esi
call fcn.00439460
mov eax, dword [0x46d64c]
add esp, 0xc
cmp eax, ebx
je 0x41435d
mov dword [eax + 0x110], esi
mov dword [esi + 0x110], 0x46d648
mov ecx, dword [0x46d64c]
lea eax, [esi + 0x114]
mov dword [eax], ecx
cmp dword [0x46d648], ebx
jne 0x414389
mov dword [eax], 0xeafc5e23
mov dword [0x46d648], esi
mov eax, dword [ebp - 0x74]
mov dword [0x46d64c], esi
mov cl, byte [esi + 0x142]
mov dword [esi + 0x148], eax
mov eax, dword [ebp + 0xb8]
mov dword [esi + 0x14c], eax
mov eax, 0x200
shl eax, cl
mov dword [esi + 0x120], edi
mov edi, dword [ebp - 0x60]
mov dword [esi + 0x108], ebx
mov dword [esi + 0x154], eax
mov eax, dword [ebp - 0x6c]
mov dword [esi + 0x15c], eax
lea eax, [esi + 0x124]
mov dword [esi + 0x10c], eax
mov eax, dword [ebp - 0x7c]
mov dword [esi + 0x164], eax
mov eax, dword [ebp + 0xc4]
mov dword [esi + 0x16c], eax
mov dword [esi + 0x150], ebx
mov dword [esi + 0x104], ebx
mov dword [esi + 0x158], ebx
mov dword [esi + 0x168], 1
mov dword [esi + 0x170], ebx
mov eax, dword [0x46d644]
shl eax, 2
push eax
push dword [0x46d640]
push edi
call fcn.004377d0
mov eax, dword [0x46d644]
mov dword [edi + eax*4], esi
mov eax, dword [0x46d640]
add esp, 0xc
cmp eax, ebx
je 0x414441
push eax
call fcn.004136f6
inc dword [0x46d644]
xor ebx, ebx
inc ebx
cmp dword [0x46d644], ebx
mov dword [0x46d640], edi
jbe 0x41445d
call fcn.00413a10
mov eax, dword [ebp - 0x64]
mov dword [eax], esi
jmp 0x4142e7
test byte [ebp + 0xc4], 4
je 0x414478
push 2
call dword [sym.imp.KERNEL32.DLL_SetLastError]
mov eax, dword [ebp - 0x64]
or dword [eax], 0xffffffff
jmp 0x4142e7
push 0x57
call dword [sym.imp.KERNEL32.DLL_SetLastError]
cmp edi, ebx
je 0x414491
mov dword [edi], ebx
xor eax, eax
mov ecx, dword [ebp + 0xa8]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00435287
add ebp, 0xac
leave
ret 0x1c