Function at 0x45c970
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4eb0e5
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x18
mov eax, ecx
push ebx
push esi
push edi
cmp dword [eax + 0x2c], 0
mov dword [ebp - 0x14], eax
jne 0x45cfd8
xor edi, edi
mov dword [ebp - 0x24], edi
mov dword [ebp - 0x20], edi
mov dword [ebp - 4], edi
call fcn.00401bb0
mov ecx, eax
test ecx, ecx
je 0x45cfeb
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x10], eax
mov byte [ebp - 4], 1
lea eax, [ebp - 0x10]
push dword [0x53d638]
push str._sMappingPCDef.dat
push eax
call fcn.004063e0
mov esi, dword [ebp - 0x10]
add esp, 0xc
push edi
push 0x80
push 3
push edi
push 1
push SysReAllocStringLen
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
jne 0x45ca0b
call fcn.00464790
test eax, eax
js 0x45cf06
jmp 0x45ca10
mov edi, eax
mov dword [ebp - 0x24], edi
lea eax, [ebp - 0x18]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, eax
mov dword [ebp - 0x1c], ebx
cmp ebx, 0xffffffff
jne 0x45ca31
call fcn.00464790
mov ebx, dword [ebp - 0x1c]
test eax, eax
js 0x45ca37
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x18], eax
mov esi, dword [ebp - 0x14]
push ebx
mov dword [esi + 0x2c], ebx
call dword [sym.imp.mfc140.dll_Ordinal_265]
add esp, 4
mov dword [esi + 0x28], eax
lea ecx, [ebp - 0x18]
mov dword [ebp - 0x18], 0
push 0
push ecx
push dword [esi + 0x2c]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x45ca6b
call fcn.00464790
test edi, edi
je 0x45ca7b
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor edi, edi
mov dword [ebp - 0x24], edi
push dword [0x53d638]
lea eax, [ebp - 0x10]
push str._sMappingTownDef.dat
push eax
call fcn.004063e0
mov esi, dword [ebp - 0x10]
add esp, 0xc
push 0
push 0x80
push 3
push 0
push 1
push SysReAllocStringLen
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
jne 0x45cac2
call fcn.00464790
test eax, eax
js 0x45cf06
jmp 0x45cac7
mov edi, eax
mov dword [ebp - 0x24], edi
lea eax, [ebp - 0x18]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x1c], eax
cmp eax, 0xffffffff
jne 0x45cae6
call fcn.00464790
test eax, eax
js 0x45caee
mov eax, dword [ebp - 0x1c]
mov ebx, eax
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x18], eax
mov esi, dword [ebp - 0x14]
push ebx
mov dword [esi + 0x34], ebx
call dword [sym.imp.mfc140.dll_Ordinal_265]
add esp, 4
mov dword [esi + 0x30], eax
lea ecx, [ebp - 0x18]
mov dword [ebp - 0x18], 0
push 0
push ecx
push dword [esi + 0x34]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x45cb22
call fcn.00464790
test edi, edi
je 0x45cb32
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor edi, edi
mov dword [ebp - 0x24], edi
push dword [0x53d638]
lea eax, [ebp - 0x10]
push str._sMappingCoastDef.dat
push eax
call fcn.004063e0
mov esi, dword [ebp - 0x10]
add esp, 0xc
push 0
push 0x80
push 3
push 0
push 1
push SysReAllocStringLen
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
jne 0x45cb79
call fcn.00464790
test eax, eax
js 0x45cf06
jmp 0x45cb7e
mov edi, eax
mov dword [ebp - 0x24], edi
lea eax, [ebp - 0x18]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x1c], eax
cmp eax, 0xffffffff
jne 0x45cb9d
call fcn.00464790
test eax, eax
js 0x45cba5
mov eax, dword [ebp - 0x1c]
mov ebx, eax
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x18], eax
mov esi, dword [ebp - 0x14]
push ebx
mov dword [esi + 0x3c], ebx
call dword [sym.imp.mfc140.dll_Ordinal_265]
add esp, 4
mov dword [esi + 0x38], eax
lea ecx, [ebp - 0x18]
mov dword [ebp - 0x18], 0
push 0
push ecx
push dword [esi + 0x3c]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x45cbd9
call fcn.00464790
test edi, edi
je 0x45cbe9
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor edi, edi
mov dword [ebp - 0x24], edi
push dword [0x53d638]
lea eax, [ebp - 0x10]
push str._sMappingBuiltupDef.dat
push eax
call fcn.004063e0
mov esi, dword [ebp - 0x10]
add esp, 0xc
push 0
push 0x80
push 3
push 0
push 1
push SysReAllocStringLen
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
jne 0x45cc30
call fcn.00464790
test eax, eax
js 0x45cf06
jmp 0x45cc35
mov edi, eax
mov dword [ebp - 0x24], edi
lea eax, [ebp - 0x18]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x1c], eax
cmp eax, 0xffffffff
jne 0x45cc54
call fcn.00464790
test eax, eax
js 0x45cc5c
mov eax, dword [ebp - 0x1c]
mov ebx, eax
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x18], eax
mov esi, dword [ebp - 0x14]
push ebx
mov dword [esi + 0x44], ebx
call dword [sym.imp.mfc140.dll_Ordinal_265]
add esp, 4
mov dword [esi + 0x40], eax
lea ecx, [ebp - 0x18]
mov dword [ebp - 0x18], 0
push 0
push ecx
push dword [esi + 0x44]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x45cc90
call fcn.00464790
test edi, edi
je 0x45cca0
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor edi, edi
mov dword [ebp - 0x24], edi
push dword [0x53d638]
lea eax, [ebp - 0x10]
push str._sMappingRoadDef.dat
push eax
call fcn.004063e0
mov esi, dword [ebp - 0x10]
add esp, 0xc
push 0
push 0x80
push 3
push 0
push 1
push SysReAllocStringLen
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
jne 0x45cce7
call fcn.00464790
test eax, eax
js 0x45cf06
jmp 0x45ccec
mov edi, eax
mov dword [ebp - 0x24], edi
lea eax, [ebp - 0x18]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x1c], eax
cmp eax, 0xffffffff
jne 0x45cd0b
call fcn.00464790
test eax, eax
js 0x45cd13
mov eax, dword [ebp - 0x1c]
mov ebx, eax
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x18], eax
mov esi, dword [ebp - 0x14]
push ebx
mov dword [esi + 0x4c], ebx
call dword [sym.imp.mfc140.dll_Ordinal_265]
add esp, 4
mov dword [esi + 0x48], eax
lea ecx, [ebp - 0x18]
mov dword [ebp - 0x18], 0
push 0
push ecx
push dword [esi + 0x4c]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x45cd47
call fcn.00464790
test edi, edi
je 0x45cd57
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor edi, edi
mov dword [ebp - 0x24], edi
push dword [0x53d638]
lea eax, [ebp - 0x10]
push str._sMappingRiverDef.dat
push eax
call fcn.004063e0
mov esi, dword [ebp - 0x10]
add esp, 0xc
push 0
push 0x80
push 3
push 0
push 1
push SysReAllocStringLen
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
jne 0x45cd9e
call fcn.00464790
test eax, eax
js 0x45cf06
jmp 0x45cda3
mov edi, eax
mov dword [ebp - 0x24], edi
lea eax, [ebp - 0x18]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x1c], eax
cmp eax, 0xffffffff
jne 0x45cdc2
call fcn.00464790
test eax, eax
js 0x45cdca
mov eax, dword [ebp - 0x1c]
mov ebx, eax
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x18], eax
mov esi, dword [ebp - 0x14]
push ebx
mov dword [esi + 0x54], ebx
call dword [sym.imp.mfc140.dll_Ordinal_265]
add esp, 4
mov dword [esi + 0x50], eax
lea ecx, [ebp - 0x18]
mov dword [ebp - 0x18], 0
push 0
push ecx
push dword [esi + 0x54]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x45cdfe
call fcn.00464790
test edi, edi
je 0x45ce0e
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor edi, edi
mov dword [ebp - 0x24], edi
push dword [0x53d638]
lea eax, [ebp - 0x10]
push str._sMappingLochsDef.dat
push eax
call fcn.004063e0
mov esi, dword [ebp - 0x10]
add esp, 0xc
push 0
push 0x80
push 3
push 0
push 1
push SysReAllocStringLen
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
jne 0x45ce55
call fcn.00464790
test eax, eax
js 0x45cf06
jmp 0x45ce5a
mov edi, eax
mov dword [ebp - 0x24], edi
lea eax, [ebp - 0x18]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x1c], eax
cmp eax, 0xffffffff
jne 0x45ce79
call fcn.00464790
test eax, eax
js 0x45ce81
mov eax, dword [ebp - 0x1c]
mov ebx, eax
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x18], eax
mov esi, dword [ebp - 0x14]
push ebx
mov dword [esi + 0x5c], ebx
call dword [sym.imp.mfc140.dll_Ordinal_265]
add esp, 4
mov dword [esi + 0x58], eax
lea ecx, [ebp - 0x18]
mov dword [ebp - 0x18], 0
push 0
push ecx
push dword [esi + 0x5c]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x45ceb5
call fcn.00464790
test edi, edi
je 0x45cec5
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor edi, edi
mov dword [ebp - 0x24], edi
push dword [0x53d638]
lea eax, [ebp - 0x10]
push str._sMappingRailDef.dat
push eax
call fcn.004063e0
mov esi, dword [ebp - 0x10]
add esp, 0xc
push 0
push 0x80
push 3
push 0
push 1
push SysReAllocStringLen
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
jne 0x45cf40
call fcn.00464790
test eax, eax
jns 0x45cf45
mov byte [ebp - 4], 0
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x45cf22
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
test edi, edi
je 0x45cf2d
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor al, al
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret
mov edi, eax
mov dword [ebp - 0x24], edi
lea eax, [ebp - 0x18]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x1c], eax
cmp eax, 0xffffffff
jne 0x45cf64
call fcn.00464790
test eax, eax
js 0x45cf6c
mov eax, dword [ebp - 0x1c]
mov ebx, eax
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x14]
push ebx
mov dword [eax + 0x64], ebx
call dword [sym.imp.mfc140.dll_Ordinal_265]
mov ecx, dword [ebp - 0x14]
lea edx, [ebp - 0x18]
add esp, 4
mov dword [ebp - 0x18], 0
mov dword [ecx + 0x60], eax
push 0
push edx
push dword [ecx + 0x64]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x45cfa3
call fcn.00464790
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
test edi, edi
je 0x45cfb5
push edi
call ebx
xor edi, edi
mov dword [ebp - 0x24], edi
mov byte [ebp - 4], 0
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x45cfd1
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
test edi, edi
je 0x45cfd8
push edi
call ebx
mov ecx, dword [ebp - 0xc]
mov al, 1
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret
push 0x80004005
call fcn.00401f30
int3