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

Disassembly:
sub esp, 0x194
push ebx
push ebp
push esi
push edi
lea eax, [esp + 0xa0]
xor esi, esi
push 0x104
push eax
push esi
mov dword [esp + 0x2c], esi
mov dword [esp + 0x20], esi
mov dword [esp + 0x28], esi
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea ecx, [esp + 0xa0]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecA]
mov al, byte [0x5205be]
mov ebx, dword [sym.imp.SHLWAPI.dll_PathCombineA]
test al, al
lea edx, [esp + 0xa0]
je 0x464990
push str.nesdbase.dat
lea eax, [esp + 0xa4]
push edx
push eax
jmp 0x46499e
lea ecx, [esp + 0xa0]
push str.famicom.dat
push ecx
push edx
call ebx
mov edi, dword [sym.imp.KERNEL32.dll_CreateFileA]
push esi
push 0x80
push 3
push esi
push esi
lea eax, [esp + 0xb4]
push bind
push eax
call edi
mov ebp, dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
cmp esi, 0xffffffff
je 0x464a0f
push 0
push esi
call ebp
cmp eax, 0xffffffff
mov dword [esp + 0x18], eax
je 0x464a08
inc eax
push eax
call fcn.0048ac32
add esp, 4
mov dword [esp + 0x14], eax
test eax, eax
je 0x464a08
mov ecx, dword [esp + 0x18]
lea edx, [esp + 0x18]
push 0
push edx
mov byte [ecx + eax], 0
mov ecx, dword [esp + 0x20]
push ecx
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, byte [0x5205c1]
test al, al
je 0x464a2c
mov esi, dword [esp + 0x14]
cmp al, 1
jne 0x464ae9
test esi, esi
jne 0x464ae9
lea edx, [esp + 0xa0]
push edx
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecA]
mov al, byte [0x5205be]
test al, al
lea eax, [esp + 0xa0]
je 0x464a5a
push str.famicom.dat
lea ecx, [esp + 0xa4]
push eax
push ecx
jmp 0x464a68
lea edx, [esp + 0xa0]
push str.nesdbase.dat
push edx
push eax
call ebx
push 0
push 0x80
push 3
push 0
push 0
lea ecx, [esp + 0xb4]
push bind
push ecx
call edi
mov esi, eax
cmp esi, 0xffffffff
je 0x464ae5
push 0
push esi
call ebp
cmp eax, 0xffffffff
mov dword [esp + 0x18], eax
je 0x464ad4
inc eax
push eax
call fcn.0048ac32
mov ebp, eax
add esp, 4
test ebp, ebp
je 0x464ad8
mov edx, dword [esp + 0x18]
lea eax, [esp + 0x18]
push 0
push eax
mov byte [edx + ebp], 0
mov ecx, dword [esp + 0x20]
push ecx
push ebp
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [esp + 0x14]
jmp 0x464aed
mov ebp, dword [esp + 0x1c]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [esp + 0x14]
jmp 0x464aed
mov esi, dword [esp + 0x14]
mov ebp, dword [esp + 0x1c]
mov edx, dword [0x523c98]
mov ebx, dword [sym.imp.USER32.dll_SendMessageA]
push 0
push 0xffffffffffffffff
push 0x100c
push edx
call ebx
mov edi, eax
cmp edi, 0xffffffff
je 0x464c75
mov eax, dword [0x4a3a28]
lea edx, [esp + 0x3c]
mov dword [esp + 0x44], eax
mov eax, dword [0x523c98]
push edx
push edi
lea ecx, [esp + 0x2c]
push 0x102d
push eax
mov byte [esp + 0x34], 0
mov dword [esp + 0x64], 9
mov dword [esp + 0x60], ecx
call ebx
mov al, byte [esp + 0x24]
test al, al
je 0x464c59
mov ecx, dword [str._a_b_t_n_v_f_r]
lea eax, [esp + 0x64]
mov dword [esp + 0x6c], ecx
mov ecx, dword [0x523c98]
push eax
push edi
lea edx, [esp + 0x38]
push 0x102d
push ecx
mov dword [esp + 0x8c], 9
mov dword [esp + 0x88], edx
call ebx
test esi, esi
je 0x464cb5
lea edx, [esp + 0x13]
lea eax, [esp + 0x30]
push edx
lea ecx, [esp + 0x28]
push eax
push ecx
push esi
call fcn.00464d80
add esp, 0x10
cmp eax, 0xffffffff
je 0x464cb5
mov cl, byte [esp + 0x13]
test cl, cl
mov ecx, dword [0x520468]
lea esi, [ecx + ecx*8]
lea esi, [ecx + esi*4]
je 0x464be1
shl esi, 3
sub esi, ecx
mov ecx, dword [0x523ca0]
mov edx, str.HACK
lea esi, [ecx + esi*4 + 0x35c]
mov cl, byte [edx]
inc edx
mov byte [esi], cl
inc esi
test cl, cl
jne 0x464bd5
jmp 0x464c02
shl esi, 3
sub esi, ecx
mov ecx, dword [0x523ca0]
mov edx, str.GOOD
lea esi, [ecx + esi*4 + 0x35c]
mov cl, byte [edx]
inc edx
mov byte [esi], cl
inc esi
test cl, cl
jne 0x464bf8
mov edx, dword [esp + 0x14]
add eax, edx
push eax
mov eax, dword [0x523c98]
push edi
push eax
call fcn.00464e80
mov eax, dword [esp + 0x2c]
mov ecx, dword [0x520468]
add esp, 0xc
inc eax
lea edx, [esp + 0x8c]
mov dword [esp + 0x20], eax
push ecx
push eax
push str.__u____u__NES_ROM_CRC_check
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
mov ecx, dword [esp + 0x1b8]
add esp, 0x10
lea eax, [esp + 0x8c]
push eax
push ecx
call dword [sym.imp.USER32.dll_SetWindowTextA]
mov esi, dword [esp + 0x14]
mov edx, dword [0x523c98]
push 0
push edi
push 0x100c
push edx
call ebx
mov edi, eax
cmp edi, 0xffffffff
jne 0x464b10
test esi, esi
je 0x464c82
push esi
call fcn.0048ace4
add esp, 4
test ebp, ebp
je 0x464c8f
push ebp
call fcn.0048ace4
add esp, 4
mov esi, dword [esp + 0x1a8]
push esi
call fcn.004662e0
push esi
call fcn.00466c10
add esp, 8
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x194
ret
test ebp, ebp
je 0x464d50
lea ecx, [esp + 0x13]
lea edx, [esp + 0x30]
push ecx
lea eax, [esp + 0x28]
push edx
push eax
push ebp
call fcn.00464d80
add esp, 0x10
cmp eax, 0xffffffff
je 0x464d50
mov cl, byte [esp + 0x13]
test cl, cl
mov ecx, dword [0x520468]
lea esi, [ecx + ecx*8]
lea esi, [ecx + esi*4]
je 0x464d1f
shl esi, 3
sub esi, ecx
mov ecx, dword [0x523ca0]
mov edx, str.HACK
lea esi, [ecx + esi*4 + 0x35c]
mov cl, byte [edx]
inc edx
mov byte [esi], cl
inc esi
test cl, cl
jne 0x464d05
mov edx, dword [0x523c98]
add eax, ebp
push eax
push edi
push edx
jmp 0x464c10
shl esi, 3
sub esi, ecx
mov ecx, dword [0x523ca0]
mov edx, str.GOOD
lea esi, [ecx + esi*4 + 0x35c]
mov cl, byte [edx]
inc edx
mov byte [esi], cl
inc esi
test cl, cl
jne 0x464d36
mov edx, dword [0x523c98]
add eax, ebp
push eax
push edi
push edx
jmp 0x464c10
lea eax, [edi + edi*8]
mov ecx, 0x4a3b8c
lea edx, [edi + eax*4]
mov eax, dword [0x523ca0]
shl edx, 3
sub edx, edi
lea edx, [eax + edx*4 + 0x35c]
mov al, byte [ecx]
inc ecx
mov byte [edx], al
inc edx
test al, al
jne 0x464d6c
jmp 0x464c59