Function at 0x413e81
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 0x4144ee
cmp edi, ebx
je 0x4144ee
cmp byte [eax], bl
jne 0x413ed4
push 0x57
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x4144fa
push 4
lea eax, [ebp - 0x80]
push ebx
push eax
mov dword [ebp - 0x74], ebx
call fcn.00437770
mov eax, dword [ebp - 0x70]
push 2
pop esi
push esi
inc eax
push 0x454774
push eax
call fcn.00437c6b
add esp, 0x18
test eax, eax
jne 0x413f04
push 3
push dword [ebp - 0x70]
jmp 0x413f19
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.00437870
add esp, 0xc
lea eax, [ebp - 0x80]
push eax
call dword [sym.imp.KERNEL32.dll_GetDriveTypeA]
cmp eax, 5
jne 0x413f39
mov dword [ebp - 0x74], esi
jmp 0x413f49
test byte [ebp + 0xbc], 2
je 0x413f49
mov dword [ebp - 0x74], 1
test byte [ebp + 0xbc], 1
je 0x413f5c
test byte [ebp - 0x74], 2
je 0x4144fa
test byte [ebp + 0xc4], 0x20
je 0x413f6e
mov dword [ebp - 0x6c], 4
jmp 0x413f8d
test byte [ebp + 0xc4], 8
je 0x413f7c
mov dword [ebp - 0x6c], esi
jmp 0x413f8d
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 0x413fc5
test byte [ebp + 0xc4], 4
jne 0x413fa9
push 0x8520006c
jmp 0x413ec9
mov eax, 0x8000
test dword [ebp + 0xc4], eax
mov dword [ebp - 0x60], SysReAllocStringLen
je 0x413fd6
xor dword [ebp + 0xc4], eax
jmp 0x413fd6
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.00413796
cmp edi, 0xffffffff
jne 0x41404c
push ebx
push ebx
push dword [ebp - 0x70]
call fcn.00413977
add esp, 0xc
push eax
lea ecx, [ebp - 0x68]
mov dword [ebp - 0x7c], eax
call fcn.00413e6a
push dword [ebp - 0x7c]
mov edi, eax
push edi
push dword [ebp - 0x70]
call fcn.00413977
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 0x4144d2
mov eax, dword [0x46d644]
lea eax, [eax*4 + 4]
push eax
call fcn.00417a63
cmp eax, ebx
mov dword [ebp - 0x60], eax
jne 0x41407e
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x64]
lea ecx, [ebp - 0x68]
mov dword [eax], ebx
call fcn.0041379c
jmp 0x4144fc
mov esi, dword [sym.imp.KERNEL32.dll_GetFileSize]
push ebx
push edi
call esi
test eax, eax
jne 0x4141ec
test byte [ebp + 0xc4], 0x10
jne 0x4141ec
push 0x174
mov dword [ebp - 0x6c], ebx
call fcn.00417a63
mov esi, eax
cmp esi, ebx
jne 0x4140ba
push dword [ebp - 0x60]
call fcn.004179da
jmp 0x414065
push 4
push dword [0x468010]
lea eax, [esi + 0x124]
push eax
call fcn.00437870
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 0x4140f9
mov word [esi + 0x142], 3
jmp 0x414100
mov word [esi + 0x142], ax
xor eax, eax
inc eax
cmp dword [ebp + 0xc8], eax
jbe 0x414115
add eax, eax
cmp eax, dword [ebp + 0xc8]
jb 0x41410b
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 0x414163
push dword [ebp - 0x60]
call fcn.004179da
push esi
jmp 0x4140b3
mov eax, dword [esi + 0x12c]
mov dword [ebp - 0x7c], eax
mov eax, dword [esi + 0x138]
shl eax, 4
push eax
call fcn.00417a63
cmp eax, ebx
mov dword [esi + 0x118], eax
je 0x414155
mov ecx, dword [esi + 0x138]
shl ecx, 4
push ecx
push 0xff
push eax
call fcn.00437770
push dword [0x46d520]
mov eax, dword [esi + 0x138]
shl eax, 4
push eax
push dword [esi + 0x118]
call fcn.00413c9d
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 0x414361
push dword [esi + 0x118]
call fcn.004179da
jmp 0x414155
push edi
call fcn.004138c4
cmp eax, 0xffffffff
mov dword [ebp - 0x6c], eax
jne 0x414219
push dword [ebp - 0x60]
call fcn.004179da
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x85200065
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x41406c
push ebx
push edi
call esi
push 0x174
mov dword [ebp - 0x7c], eax
call fcn.00417a63
mov esi, eax
cmp esi, ebx
je 0x4140b0
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 0x414155
mov eax, dword [esi + 0x138]
shl eax, 4
push eax
call fcn.00417a63
cmp eax, ebx
mov dword [esi + 0x118], eax
je 0x414155
mov eax, dword [esi + 0x13c]
cmp eax, ebx
je 0x41429b
shl eax, 4
push eax
call fcn.00417a63
cmp eax, ebx
mov dword [esi + 0x11c], eax
je 0x4141dc
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 0x4142e7
mov eax, dword [esi + 0x11c]
cmp eax, ebx
je 0x4141dc
push eax
call fcn.004179da
jmp 0x4141dc
cmp dword [esi + 0x13c], ebx
je 0x414361
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 0x414361
push dword [esi + 0x11c]
call fcn.004179da
push dword [esi + 0x118]
call fcn.004179da
push dword [ebp - 0x60]
call fcn.004179da
push esi
call fcn.004179da
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x64]
mov dword [eax], ebx
lea ecx, [ebp - 0x68]
call fcn.0041379c
mov eax, ebx
jmp 0x4144fe
push dword [0x46d520]
mov eax, dword [esi + 0x138]
shl eax, 4
push eax
push dword [esi + 0x118]
call fcn.00413d00
mov eax, dword [esi + 0x11c]
add esp, 0xc
cmp eax, ebx
je 0x4143a2
push dword [0x46d524]
mov ecx, dword [esi + 0x13c]
shl ecx, 4
push ecx
push eax
call fcn.00413d00
add esp, 0xc
push 0x103
push dword [ebp - 0x70]
mov dword [esi + 0x144], esi
push esi
call fcn.00439500
mov eax, dword [0x46d64c]
add esp, 0xc
cmp eax, ebx
je 0x4143c8
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 0x4143f4
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.00437870
mov eax, dword [0x46d644]
mov dword [edi + eax*4], esi
mov eax, dword [0x46d640]
add esp, 0xc
cmp eax, ebx
je 0x4144ac
push eax
call fcn.004179da
inc dword [0x46d644]
xor ebx, ebx
inc ebx
cmp dword [0x46d644], ebx
mov dword [0x46d640], edi
jbe 0x4144c8
call fcn.00413a9c
mov eax, dword [ebp - 0x64]
mov dword [eax], esi
jmp 0x414352
test byte [ebp + 0xc4], 4
je 0x4144e3
push 2
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [ebp - 0x64]
or dword [eax], 0xffffffff
jmp 0x414352
push 0x57
call dword [sym.imp.KERNEL32.dll_SetLastError]
cmp edi, ebx
je 0x4144fc
mov dword [edi], ebx
xor eax, eax
mov ecx, dword [ebp + 0xa8]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00435327
add ebp, 0xac
leave
ret 0x1c