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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x130
cmp dword [ebp + 8], 0
je 0x41647e
cmp dword [ebp + 0x14], 0
jne 0x41648d
push 0x57
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x416cb4
mov dword [ebp - 4], 0
push 4
push 0
lea eax, [ebp - 0xc]
push eax
call fcn.00431cc0
add esp, 0xc
push 2
push 0x440a54
mov ecx, dword [ebp + 8]
add ecx, 1
push ecx
call fcn.00431c10
add esp, 0xc
test eax, eax
jne 0x4164d2
push 3
mov edx, dword [ebp + 8]
push edx
lea eax, [ebp - 0xc]
push eax
call fcn.004317d0
add esp, 0xc
jmp 0x4164f9
lea ecx, [ebp - 0x118]
push ecx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
push 3
lea edx, [ebp - 0x118]
push edx
lea eax, [ebp - 0xc]
push eax
call fcn.004317d0
add esp, 0xc
lea ecx, [ebp - 0xc]
push ecx
call dword [sym.imp.KERNEL32.dll_GetDriveTypeA]
cmp eax, 5
jne 0x416513
mov edx, dword [ebp - 4]
or edx, 2
mov dword [ebp - 4], edx
jmp 0x416526
mov eax, dword [ebp + 0x10]
and eax, 2
test eax, eax
je 0x416526
mov ecx, dword [ebp - 4]
or ecx, 1
mov dword [ebp - 4], ecx
mov edx, dword [ebp + 0x10]
and edx, 1
test edx, edx
je 0x416541
mov eax, dword [ebp - 4]
and eax, 2
test eax, eax
jne 0x416541
xor eax, eax
jmp 0x416cb4
mov ecx, dword [ebp + 0x10]
and ecx, 0x8000
test ecx, ecx
je 0x41656c
push 0
push 0
push 3
push 0
push 1
push 0xc0000000
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x14], eax
jmp 0x416588
push 0
push 0
push 3
push 0
push 1
push SysReAllocString
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0xffffffff
jne 0x416634
push 0
push 0
mov ecx, dword [ebp + 8]
push ecx
call fcn.0041f139
add esp, 0xc
mov dword [ebp - 0x120], eax
mov eax, dword [ebp - 0x120]
add eax, 3
and al, 0xfc
call fcn.00431750
mov dword [ebp - 0x130], esp
mov edx, dword [ebp - 0x130]
mov dword [ebp - 0x11c], edx
mov eax, dword [ebp - 0x120]
push eax
mov ecx, dword [ebp - 0x11c]
push ecx
mov edx, dword [ebp + 8]
push edx
call fcn.0041f139
add esp, 0xc
mov eax, dword [ebp - 0x11c]
mov dword [ebp + 8], eax
mov ecx, dword [ebp + 0x10]
and ecx, 0x8000
test ecx, ecx
je 0x416618
push 0
push 0
push 3
push 0
push 1
push 0xc0000000
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x14], eax
jmp 0x416634
push 0
push 0
push 3
push 0
push 1
push SysReAllocString
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0xffffffff
je 0x416ca3
push 4
push 0x1000
mov ecx, dword [0x447a88]
lea edx, [ecx*4 + 4]
push edx
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov dword [ebp - 0x12c], eax
cmp dword [ebp - 0x12c], 0
jne 0x41667b
mov eax, dword [ebp - 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x416cb4
mov ecx, dword [ebp - 0x14]
push ecx
call fcn.0041f05b
mov dword [ebp - 0x124], eax
cmp dword [ebp - 0x124], 0xffffffff
jne 0x4166b8
push 0x8000
push 0
mov edx, dword [ebp - 0x12c]
push edx
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov eax, dword [ebp - 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x416cb4
push 0
mov ecx, dword [ebp - 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x10], eax
push 4
push 0x1000
push 0x178
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
add eax, 0xc
mov dword [ebp - 0x128], eax
cmp dword [ebp - 0x128], 0
jne 0x416712
push 0x8000
push 0
mov edx, dword [ebp - 0x12c]
push edx
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov eax, dword [ebp - 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x416cb4
push 0
push 0
mov ecx, dword [ebp - 0x124]
push ecx
mov edx, dword [ebp - 0x14]
push edx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea eax, [ebp - 8]
push eax
push 0x20
mov ecx, dword [ebp - 0x128]
add ecx, 0x144
push ecx
mov edx, dword [ebp - 0x14]
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x416783
push 0x8000
push 0
mov eax, dword [ebp - 0x12c]
push eax
call dword [sym.imp.KERNEL32.dll_VirtualFree]
push 0x8000
push 0
mov ecx, dword [ebp - 0x128]
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov edx, dword [ebp - 0x14]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x416cb4
push 4
push 0x1000
mov eax, dword [ebp - 0x128]
mov ecx, dword [eax + 0x15c]
shl ecx, 4
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov edx, dword [ebp - 0x128]
mov dword [edx + 0x138], eax
mov eax, dword [ebp - 0x128]
cmp dword [eax + 0x138], 0
jne 0x4167f6
push 0x8000
push 0
mov ecx, dword [ebp - 0x12c]
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualFree]
push 0x8000
push 0
mov edx, dword [ebp - 0x128]
push edx
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov eax, dword [ebp - 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x416cb4
mov ecx, dword [ebp - 0x128]
cmp dword [ecx + 0x160], 0
je 0x416896
push 4
push 0x1000
mov edx, dword [ebp - 0x128]
mov eax, dword [edx + 0x160]
shl eax, 4
push eax
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov ecx, dword [ebp - 0x128]
mov dword [ecx + 0x134], eax
mov edx, dword [ebp - 0x128]
cmp dword [edx + 0x134], 0
jne 0x416896
push 0x8000
push 0
mov eax, dword [ebp - 0x128]
mov ecx, dword [eax + 0x138]
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualFree]
push 0x8000
push 0
mov edx, dword [ebp - 0x12c]
push edx
call dword [sym.imp.KERNEL32.dll_VirtualFree]
push 0x8000
push 0
mov eax, dword [ebp - 0x128]
push eax
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov ecx, dword [ebp - 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x416cb4
push 0
push 0
mov edx, dword [ebp - 0x128]
mov eax, dword [ebp - 0x124]
add eax, dword [edx + 0x154]
push eax
mov ecx, dword [ebp - 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea edx, [ebp - 8]
push edx
mov eax, dword [ebp - 0x128]
mov ecx, dword [eax + 0x15c]
shl ecx, 4
push ecx
mov edx, dword [ebp - 0x128]
mov eax, dword [edx + 0x138]
push eax
mov ecx, dword [ebp - 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x416964
mov edx, dword [ebp - 0x128]
cmp dword [edx + 0x134], 0
je 0x416911
push 0x8000
push 0
mov eax, dword [ebp - 0x128]
mov ecx, dword [eax + 0x134]
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualFree]
push 0x8000
push 0
mov edx, dword [ebp - 0x128]
mov eax, dword [edx + 0x138]
push eax
call dword [sym.imp.KERNEL32.dll_VirtualFree]
push 0x8000
push 0
mov ecx, dword [ebp - 0x12c]
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualFree]
push 0x8000
push 0
mov edx, dword [ebp - 0x128]
push edx
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov eax, dword [ebp - 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x416cb4
mov ecx, dword [ebp - 0x128]
cmp dword [ecx + 0x160], 0
je 0x416a36
push 0
push 0
mov edx, dword [ebp - 0x128]
mov eax, dword [ebp - 0x124]
add eax, dword [edx + 0x158]
push eax
mov ecx, dword [ebp - 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea edx, [ebp - 8]
push edx
mov eax, dword [ebp - 0x128]
mov ecx, dword [eax + 0x160]
shl ecx, 4
push ecx
mov edx, dword [ebp - 0x128]
mov eax, dword [edx + 0x134]
push eax
mov ecx, dword [ebp - 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x416a36
push 0x8000
push 0
mov edx, dword [ebp - 0x128]
mov eax, dword [edx + 0x134]
push eax
call dword [sym.imp.KERNEL32.dll_VirtualFree]
push 0x8000
push 0
mov ecx, dword [ebp - 0x128]
mov edx, dword [ecx + 0x138]
push edx
call dword [sym.imp.KERNEL32.dll_VirtualFree]
push 0x8000
push 0
mov eax, dword [ebp - 0x12c]
push eax
call dword [sym.imp.KERNEL32.dll_VirtualFree]
push 0x8000
push 0
mov ecx, dword [ebp - 0x128]
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov edx, dword [ebp - 0x14]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x416cb4
mov eax, dword [0x447968]
push eax
mov ecx, dword [ebp - 0x128]
mov edx, dword [ecx + 0x15c]
shl edx, 4
push edx
mov eax, dword [ebp - 0x128]
mov ecx, dword [eax + 0x138]
push ecx
call fcn.00420355
add esp, 0xc
mov edx, dword [ebp - 0x128]
cmp dword [edx + 0x160], 0
je 0x416a9b
mov eax, dword [0x446564]
push eax
mov ecx, dword [ebp - 0x128]
mov edx, dword [ecx + 0x160]
shl edx, 4
push edx
mov eax, dword [ebp - 0x128]
mov ecx, dword [eax + 0x134]
push ecx
call fcn.00420355
add esp, 0xc
mov edx, dword [ebp - 0x128]
add edx, 8
mov eax, dword [ebp - 0x128]
mov dword [eax + 0x168], edx
push 0x104
mov ecx, dword [ebp + 8]
push ecx
mov edx, dword [ebp - 0x128]
mov eax, dword [edx + 0x168]
push eax
call fcn.00431b10
add esp, 0xc
cmp dword [0x447a90], 0
je 0x416ae5
mov ecx, dword [0x447a90]
mov edx, dword [ebp - 0x128]
mov dword [ecx], edx
mov eax, dword [ebp - 0x128]
mov dword [eax], 0x447a8c
mov ecx, dword [ebp - 0x128]
mov edx, dword [0x447a90]
mov dword [ecx + 4], edx
cmp dword [0x447a8c], 0
jne 0x416b22
mov eax, dword [ebp - 0x128]
mov dword [eax + 4], 0xeafc5e23
mov ecx, dword [ebp - 0x128]
mov dword [0x447a8c], ecx
mov edx, dword [ebp - 0x128]
mov dword [0x447a90], edx
mov eax, dword [ebp - 0x128]
mov ecx, dword [ebp - 0x14]
mov dword [eax + 0x10c], ecx
mov edx, dword [ebp - 0x128]
mov eax, dword [ebp - 4]
mov dword [edx + 0x110], eax
mov ecx, dword [ebp - 0x128]
mov edx, dword [ebp + 0xc]
mov dword [ecx + 0x114], edx
mov eax, dword [ebp - 0x128]
mov dword [eax + 0x118], 0
mov ecx, dword [ebp - 0x128]
mov dword [ecx + 0x11c], 0
mov edx, dword [ebp - 0x128]
xor eax, eax
mov ax, word [edx + 0x152]
mov ecx, eax
mov edx, 0x200
shl edx, cl
mov eax, dword [ebp - 0x128]
mov dword [eax + 0x120], edx
mov ecx, dword [ebp - 0x128]
mov dword [ecx + 0x124], 0
mov edx, dword [ebp - 0x128]
mov dword [edx + 0x128], 0
mov eax, dword [ebp - 0x128]
mov ecx, dword [ebp - 0x124]
mov dword [eax + 0x12c], ecx
mov edx, dword [ebp - 0x128]
add edx, 0x144
mov eax, dword [ebp - 0x128]
mov dword [eax + 0x130], edx
mov ecx, dword [ebp - 0x128]
mov edx, dword [ebp - 0x10]
mov dword [ecx + 0x13c], edx
mov eax, dword [ebp - 0x128]
mov dword [eax + 0x140], 1
mov ecx, dword [ebp - 0x128]
mov edx, dword [ebp + 0x10]
mov dword [ecx + 0x164], edx
cmp dword [ebp + 0x14], 0
je 0x416c28
mov eax, dword [ebp + 0x14]
mov ecx, dword [ebp - 0x128]
mov dword [eax], ecx
mov edx, dword [0x447a88]
shl edx, 2
push edx
mov eax, dword [0x447a84]
push eax
mov ecx, dword [ebp - 0x12c]
push ecx
call fcn.004317d0
add esp, 0xc
mov edx, dword [0x447a88]
mov eax, dword [ebp - 0x12c]
mov ecx, dword [ebp - 0x128]
mov dword [eax + edx*4], ecx
cmp dword [0x447a84], 0
je 0x416c79
push 0x8000
push 0
mov edx, dword [0x447a84]
push edx
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov eax, dword [ebp - 0x12c]
mov dword [0x447a84], eax
mov ecx, dword [0x447a88]
add ecx, 1
mov dword [0x447a88], ecx
cmp dword [0x447a88], 1
jbe 0x416ca1
call fcn.0041f679
jmp 0x416caf
push 2
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x416cb4
mov eax, 1
lea esp, [ebp - 0x130]
mov esp, ebp
pop ebp
ret 0x10