Function at 0x405f80
Capabilities:
Get file size

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x1c
mov eax, dword [0x493b40]
push ebx
push esi
push edi
push 0
push 0x80
push 3
push 0
push 1
mov edi, edx
mov dword [esp + 0x2c], eax
push SysReAllocString
xor bl, bl
push edi
mov byte [esp + 0x2b], bl
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [esp + 0x14], eax
cmp eax, 0xffffffff
jne 0x405ff0
cmp dword [0x493b38], 0
je 0x4061c1
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push edi
push str.Unable_to_open_file__s.__Error_code___d_.
push dword [0x493b38]
call fcn.00438330
add esp, 0x10
mov al, bl
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
test esi, esi
jne 0x40602e
mov eax, dword [0x493b38]
test eax, eax
je 0x4061b7
push edi
push str.The_file__s_appears_to_be_an_empty_file_
push eax
call fcn.00438330
add esp, 0xc
push dword [esp + 0x14]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, bl
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push esi
call fcn.00438dfe
mov ebx, eax
add esp, 4
mov dword [esp + 0x10], ebx
test ebx, ebx
jne 0x406062
mov eax, dword [0x493b38]
test eax, eax
je 0x4061aa
push edi
push str.Unable_to_allocate_memory_to_load_file__s.
push eax
call fcn.00438330
add esp, 0xc
jmp 0x4061aa
push 0
lea eax, [esp + 0x20]
push eax
push esi
push ebx
push dword [esp + 0x24]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x4060a5
cmp dword [0x493b38], eax
je 0x4061aa
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push edi
push str.Unable_to_read_file__s.__Error_code___d_.
push dword [0x493b38]
call fcn.00438330
add esp, 0x10
jmp 0x4061aa
mov eax, ebx
cmp dword [eax], 0x4e494145
jne 0x4060d7
lea ebx, [eax + 4]
add esi, 0xfffffffc
mov eax, dword [0x493b38]
test eax, eax
je 0x4060cd
push edi
push str.Processing_EAIN_file__s.
push eax
call fcn.00438330
add esp, 0xc
push esi
push ebx
call fcn.00455650
add esp, 8
cmp esi, 3
jbe 0x40610a
cmp byte [ebx], 0xef
jne 0x40610a
cmp byte [ebx + 1], 0xbb
jne 0x40610a
cmp byte [ebx + 2], 0xbf
jne 0x40610a
mov eax, dword [0x493b38]
add ebx, 3
sub esi, 3
test eax, eax
je 0x40610a
push str.Processing_..._n
push eax
call fcn.00438330
add esp, 8
mov dword [esp + 0x20], ebx
lea eax, [esp + 0x20]
mov ebx, dword [esp + 0x18]
mov edx, 0x4141f0
push str.InstData
push eax
mov ecx, ebx
mov dword [esp + 0x2c], esi
call fcn.00412880
mov ecx, eax
add esp, 8
test ecx, ecx
jne 0x40618d
mov eax, dword [ebx + 8]
mov edx, 0x412860
sub eax, 0x10
mov dword [esp + 0x24], 0xffffffff
mov dword [esp + 0x20], eax
sub eax, dword [ebx + 0x20]
push ecx
push eax
lea eax, [esp + 0x28]
mov ecx, ebx
push eax
call fcn.0041c140
mov edx, dword [ebx + 8]
mov ecx, eax
mov eax, dword [ebx + 0x14]
add esp, 0xc
cmp edx, dword [eax + 8]
jb 0x406170
mov dword [eax + 8], edx
test ecx, ecx
jne 0x40617b
mov byte [esp + 0xf], 1
jmp 0x4061a6
mov eax, dword [0x493b38]
test eax, eax
je 0x4061a6
push ecx
push edi
push str.Failed_to_process_data_file__s.____d_
jmp 0x40619d
mov eax, dword [0x493b38]
test eax, eax
je 0x4061a6
push ecx
push edi
push str.Unable_to_initialize_from_data_file__s.
push eax
call fcn.00438330
add esp, 0x10
mov ebx, dword [esp + 0x10]
push ebx
call fcn.0043a089
mov bl, byte [esp + 0x13]
add esp, 4
push dword [esp + 0x14]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
mov al, bl
pop ebx
mov esp, ebp
pop ebp
ret