Function at 0x4104a0
Capabilities:
Get common file path
Get file size
Read file on windows

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x431a81
push eax
mov dword fs:[0], esp
sub esp, 0x994
push ebx
push ebp
push esi
push edi
mov edi, ecx
xor esi, esi
mov eax, dword [edi + 8]
cmp eax, esi
je 0x4104dd
mov cl, byte [edi + 4]
test cl, cl
jne 0x4104da
push eax
call fcn.00427316
add esp, 4
mov dword [edi + 8], esi
mov ebx, dword [esp + 0x9b4]
mov dword [edi + 0xc], esi
cmp ebx, esi
mov dword [edi + 0x10], esi
mov byte [edi + 4], 0
je 0x4106e5
cmp byte [ebx], 0
je 0x4106e5
push esi
push 0x80
push 3
push esi
push 1
push SysReAllocStringLen
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebp, eax
cmp ebp, 0xffffffff
jne 0x410598
mov esi, dword [esp + 0x9b8]
test esi, esi
je 0x4106fa
lea ecx, [esp + 0x14]
call fcn.0040f6e0
lea ecx, [esp + 0x14]
mov dword [esp + 0x9ac], 0
call fcn.0040fab0
mov ecx, dword [esp + 0x1c]
mov eax, dword [esi]
push ecx
mov ecx, esi
call dword [eax + 0x10]
mov edx, dword [esi]
push ebx
push str.filename
mov ecx, esi
call dword [edx + 0x2c]
lea eax, [esp + 0x44]
push eax
push 0x4af
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
mov edx, dword [esi]
lea eax, [esp + 0x44]
push eax
push str.current_dir
mov ecx, esi
call dword [edx + 0x2c]
lea ecx, [esp + 0x14]
mov dword [esp + 0x9ac], ebp
call fcn.0040f750
jmp 0x4106fa
push esi
push ebp
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
cmp esi, 0xffffffff
jne 0x4105fb
mov esi, dword [esp + 0x9b8]
test esi, esi
je 0x4105ef
lea ecx, [esp + 0x14]
call fcn.0040f6e0
lea ecx, [esp + 0x14]
mov dword [esp + 0x9ac], 1
call fcn.0040fab0
mov eax, dword [esp + 0x1c]
mov edx, dword [esi]
push eax
mov ecx, esi
call dword [edx + 0x10]
lea ecx, [esp + 0x14]
mov dword [esp + 0x9ac], 0xffffffff
call fcn.0040f750
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x4106fa
test esi, esi
jne 0x41060d
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, 1
jmp 0x4106fc
push esi
call fcn.004277ad
add esp, 4
lea ecx, [esp + 0x10]
mov dword [edi + 8], eax
mov dword [edi + 0xc], esi
push 0
push ecx
push esi
push eax
push ebp
mov dword [edi + 0x10], esi
mov dword [esp + 0x24], 0
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov edi, dword [esp + 0x9b8]
mov bl, 1
test eax, eax
jne 0x4106c2
test edi, edi
je 0x4106c0
lea ecx, [esp + 0x2c]
call fcn.0040f6e0
lea ecx, [esp + 0x2c]
mov dword [esp + 0x9ac], 2
call fcn.0040fab0
mov eax, dword [esp + 0x34]
mov edx, dword [edi]
push eax
mov ecx, edi
call dword [edx + 0x10]
mov eax, dword [esp + 0x9b4]
mov edx, dword [edi]
push eax
push str.filename
mov ecx, edi
call dword [edx + 0x2c]
lea ecx, [esp + 0x4f4]
push ecx
push 0x4af
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
mov edx, dword [edi]
lea eax, [esp + 0x4f4]
push eax
push str.current_dir
mov ecx, edi
call dword [edx + 0x2c]
lea ecx, [esp + 0x2c]
mov dword [esp + 0x9ac], 0xffffffff
call fcn.0040f750
xor bl, bl
cmp dword [esp + 0x10], esi
je 0x4106da
test edi, edi
je 0x4106d8
mov edx, dword [edi]
push str.Failed_to_read_the_entire_file
mov ecx, edi
call dword [edx + 0x10]
xor bl, bl
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, bl
jmp 0x4106fc
mov ecx, dword [esp + 0x9b8]
cmp ecx, esi
je 0x4106fa
mov eax, dword [ecx]
push str.Cannot_load_binary_data_file__filename_is_NULL_or_empty
call dword [eax + 0x10]
xor al, al
mov ecx, dword [esp + 0x9a4]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x9a0
ret 8