Function at 0x413f85
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 0x4145f2
cmp edi, ebx
je 0x4145f2
cmp byte [eax], bl
jne 0x413fd8
push 0x57
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x4145fe
push 4
lea eax, [ebp - 0x80]
push ebx
push eax
mov dword [ebp - 0x74], ebx
call fcn.00437860
mov eax, dword [ebp - 0x70]
push 2
pop esi
push esi
inc eax
push 0x454774
push eax
call fcn.00437d5b
add esp, 0x18
test eax, eax
jne 0x414008
push 3
push dword [ebp - 0x70]
jmp 0x41401d
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.00437960
add esp, 0xc
lea eax, [ebp - 0x80]
push eax
call dword [sym.imp.KERNEL32.dll_GetDriveTypeA]
cmp eax, 5
jne 0x41403d
mov dword [ebp - 0x74], esi
jmp 0x41404d
test byte [ebp + 0xbc], 2
je 0x41404d
mov dword [ebp - 0x74], 1
test byte [ebp + 0xbc], 1
je 0x414060
test byte [ebp - 0x74], 2
je 0x4145fe
test byte [ebp + 0xc4], 0x20
je 0x414072
mov dword [ebp - 0x6c], 4
jmp 0x414091
test byte [ebp + 0xc4], 8
je 0x414080
mov dword [ebp - 0x6c], esi
jmp 0x414091
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 0x4140c9
test byte [ebp + 0xc4], 4
jne 0x4140ad
push 0x8520006c
jmp 0x413fcd
mov eax, 0x8000
test dword [ebp + 0xc4], eax
mov dword [ebp - 0x60], 0x80000000
je 0x4140da
xor dword [ebp + 0xc4], eax
jmp 0x4140da
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.0041389a
cmp edi, 0xffffffff
jne 0x414150
push ebx
push ebx
push dword [ebp - 0x70]
call fcn.00413a7b
add esp, 0xc
push eax
lea ecx, [ebp - 0x68]
mov dword [ebp - 0x7c], eax
call fcn.00413f6e
push dword [ebp - 0x7c]
mov edi, eax
push edi
push dword [ebp - 0x70]
call fcn.00413a7b
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 0x4145d6
mov eax, dword [0x46d644]
lea eax, [eax*4 + 4]
push eax
call fcn.00417b53
cmp eax, ebx
mov dword [ebp - 0x60], eax
jne 0x414182
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x64]
lea ecx, [ebp - 0x68]
mov dword [eax], ebx
call fcn.004138a0
jmp 0x414600
mov esi, dword [sym.imp.KERNEL32.dll_GetFileSize]
push ebx
push edi
call esi
test eax, eax
jne 0x4142f0
test byte [ebp + 0xc4], 0x10
jne 0x4142f0
push 0x174
mov dword [ebp - 0x6c], ebx
call fcn.00417b53
mov esi, eax
cmp esi, ebx
jne 0x4141be
push dword [ebp - 0x60]
call fcn.00413886
jmp 0x414169
push 4
push dword [0x468010]
lea eax, [esi + 0x124]
push eax
call fcn.00437960
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 0x4141fd
mov word [esi + 0x142], 3
jmp 0x414204
mov word [esi + 0x142], ax
xor eax, eax
inc eax
cmp dword [ebp + 0xc8], eax
jbe 0x414219
add eax, eax
cmp eax, dword [ebp + 0xc8]
jb 0x41420f
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 0x414267
push dword [ebp - 0x60]
call fcn.00413886
push esi
jmp 0x4141b7
mov eax, dword [esi + 0x12c]
mov dword [ebp - 0x7c], eax
mov eax, dword [esi + 0x138]
shl eax, 4
push eax
call fcn.00417b53
cmp eax, ebx
mov dword [esi + 0x118], eax
je 0x414259
mov ecx, dword [esi + 0x138]
shl ecx, 4
push ecx
push 0xff
push eax
call fcn.00437860
push dword [0x46d520]
mov eax, dword [esi + 0x138]
shl eax, 4
push eax
push dword [esi + 0x118]
call fcn.00413da1
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 0x414465
push dword [esi + 0x118]
call fcn.00413886
jmp 0x414259
push edi
call fcn.004139c8
cmp eax, 0xffffffff
mov dword [ebp - 0x6c], eax
jne 0x41431d
push dword [ebp - 0x60]
call fcn.00413886
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x85200065
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x414170
push ebx
push edi
call esi
push 0x174
mov dword [ebp - 0x7c], eax
call fcn.00417b53
mov esi, eax
cmp esi, ebx
je 0x4141b4
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 0x414259
mov eax, dword [esi + 0x138]
shl eax, 4
push eax
call fcn.00417b53
cmp eax, ebx
mov dword [esi + 0x118], eax
je 0x414259
mov eax, dword [esi + 0x13c]
cmp eax, ebx
je 0x41439f
shl eax, 4
push eax
call fcn.00417b53
cmp eax, ebx
mov dword [esi + 0x11c], eax
je 0x4142e0
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 0x4143eb
mov eax, dword [esi + 0x11c]
cmp eax, ebx
je 0x4142e0
push eax
call fcn.00413886
jmp 0x4142e0
cmp dword [esi + 0x13c], ebx
je 0x414465
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 0x414465
push dword [esi + 0x11c]
call fcn.00413886
push dword [esi + 0x118]
call fcn.00413886
push dword [ebp - 0x60]
call fcn.00413886
push esi
call fcn.00413886
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x64]
mov dword [eax], ebx
lea ecx, [ebp - 0x68]
call fcn.004138a0
mov eax, ebx
jmp 0x414602
push dword [0x46d520]
mov eax, dword [esi + 0x138]
shl eax, 4
push eax
push dword [esi + 0x118]
call fcn.00413e04
mov eax, dword [esi + 0x11c]
add esp, 0xc
cmp eax, ebx
je 0x4144a6
push dword [0x46d524]
mov ecx, dword [esi + 0x13c]
shl ecx, 4
push ecx
push eax
call fcn.00413e04
add esp, 0xc
push 0x103
push dword [ebp - 0x70]
mov dword [esi + 0x144], esi
push esi
call fcn.004395f0
mov eax, dword [0x46d64c]
add esp, 0xc
cmp eax, ebx
je 0x4144cc
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 0x4144f8
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.00437960
mov eax, dword [0x46d644]
mov dword [edi + eax*4], esi
mov eax, dword [0x46d640]
add esp, 0xc
cmp eax, ebx
je 0x4145b0
push eax
call fcn.00413886
inc dword [0x46d644]
xor ebx, ebx
inc ebx
cmp dword [0x46d644], ebx
mov dword [0x46d640], edi
jbe 0x4145cc
call fcn.00413ba0
mov eax, dword [ebp - 0x64]
mov dword [eax], esi
jmp 0x414456
test byte [ebp + 0xc4], 4
je 0x4145e7
push 2
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [ebp - 0x64]
or dword [eax], 0xffffffff
jmp 0x414456
push 0x57
call dword [sym.imp.KERNEL32.dll_SetLastError]
cmp edi, ebx
je 0x414600
mov dword [edi], ebx
xor eax, eax
mov ecx, dword [ebp + 0xa8]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00435417
add ebp, 0xac
leave
ret 0x1c