Function at 0x404c80
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push 0xffffffffffffffff
push 0x423cd2
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x78
push ebx
push ebp
mov ebp, ecx
push esi
push edi
lea ecx, [esp + 0x78]
call fcn.0041f2b0
mov eax, dword [esp + 0x98]
xor edi, edi
push edi
push edi
push eax
lea ecx, [esp + 0x84]
mov dword [esp + 0x9c], edi
call fcn.0041f3c2
test eax, eax
jne 0x404cef
push edi
push str.Error
push str.Error_opening_file_:_
mov ecx, ebp
call fcn.0041caea
push edi
mov ecx, ebp
mov dword [ebp + 0x1f0], edi
call fcn.0041d246
jmp 0x40568c
lea ecx, [esp + 0x78]
call fcn.0041f6bc
lea ecx, [esp + 0x20]
mov ebx, eax
push ecx
lea ecx, [esp + 0x7c]
mov dword [esp + 0x30], ebx
call fcn.0041f8da
push ebx
mov byte [esp + 0x94], 1
call fcn.0041e94a
mov edx, ebx
add esp, 4
neg edx
and edx, ebx
mov esi, eax
cmp edx, ebx
mov dword [esp + 0x28], esi
je 0x404d67
push edi
push str.Error
push str.ROM_size_must_be_power_of_2_
mov ecx, ebp
call fcn.0041caea
push esi
call fcn.0041e973
add esp, 4
lea ecx, [esp + 0x78]
call fcn.0041f5dd
lea ecx, [esp + 0x20]
mov byte [esp + 0x90], 0
call fcn.0041e4f6
jmp 0x4056ba
push ebx
push esi
lea ecx, [esp + 0x80]
call fcn.0041f4df
cmp eax, ebx
je 0x404db0
push edi
push str.Error
push str.Error_reading_file_:_
mov ecx, ebp
call fcn.0041caea
push edi
mov ecx, ebp
mov dword [ebp + 0x1f0], edi
call fcn.0041d246
push esi
call fcn.0041e973
add esp, 4
lea ecx, [esp + 0x78]
call fcn.0041f5dd
jmp 0x40566e
push ebx
push esi
push edi
call fcn.004011a0
add esp, 0xc
mov esi, eax
lea eax, [esp + 0x20]
lea ecx, [ebp + 0xb4]
push eax
mov dword [ebp + 0xac], esi
mov dword [ebp + 0xb0], ebx
call fcn.0041e5e3
mov ecx, dword [0x42db7c]
mov dword [esp + 0x38], edi
mov dword [esp + 0x1c], ecx
lea edx, [esp + 0x1c]
push str.
push edx
mov byte [esp + 0x98], 2
call fcn.0041a1cf
add esp, 8
or dl, 0xff
xor ecx, ecx
mov byte [esp + 0x34], 0
test ebx, ebx
jbe 0x404e3e
mov eax, dword [esp + 0x28]
mov bl, byte [esp + 0x34]
mov al, byte [ecx + eax]
or bl, al
and dl, al
movzx ax, al
mov byte [esp + 0x34], bl
mov ebx, dword [esp + 0x38]
add ebx, eax
mov eax, dword [esp + 0x2c]
inc ecx
mov dword [esp + 0x38], ebx
cmp ecx, eax
jb 0x404e0f
cmp dl, 0xff
jne 0x404e4c
push str._r_n_Warning:_ROM_appears_to_be_blank__
lea ecx, [esp + 0x20]
call fcn.0041e845
mov eax, dword [ebp + 0x1f4]
xor ecx, ecx
test eax, eax
mov dword [esp + 0x54], ecx
jle 0x40556c
mov ebx, 1
mov dword [esp + 0x30], 0
shl ebx, cl
test ebx, ebx
mov dword [esp + 0x50], ebx
jle 0x405551
mov eax, dword [esp + 0x2c]
xor edx, edx
div ebx
mov ebx, eax
mov dword [esp + 0x4c], ebx
mov ecx, ebx
mov edx, dword [esp + 0x28]
imul ecx, dword [esp + 0x30]
add ecx, edx
push ebx
push ecx
push 0
mov esi, 1
call fcn.004011a0
mov ecx, eax
mov eax, dword [ebp + 0x1f8]
add esp, 0xc
mov dword [esp + 0x44], ecx
test eax, eax
je 0x404f6a
cmp ebx, 0x2000
jg 0x404f2c
je 0x404f1f
cmp ebx, 0x800
jg 0x404f0a
je 0x404efd
cmp ebx, 0x100
je 0x404ef0
cmp ebx, 0x400
jne 0x404f6a
cmp ecx, 0xb83afff4
jne 0x404f6a
jmp 0x405534
cmp ecx, 0xfea8a821
jne 0x404f6a
jmp 0x405534
cmp ecx, 0x3f55d17f
jne 0x404f6a
jmp 0x405534
cmp ebx, 0x1000
jne 0x404f6a
cmp ecx, 0xf154670a
jne 0x404f6a
jmp 0x405534
cmp ecx, 0xb4293435
jne 0x404f6a
jmp 0x405534
cmp ebx, 0x4000
je 0x404f5e
cmp ebx, 0x8000
je 0x404f51
cmp ebx, 0x10000
jne 0x404f6a
cmp ecx, 0xdeab7e4e
jne 0x404f6a
jmp 0x405534
cmp ecx, 0x1b43eabd
jne 0x404f6a
jmp 0x405534
cmp ecx, 0x690b37d3
je 0x405534
mov eax, dword [ebp + 0x74]
mov dword [ebp + 0x80], eax
mov edx, dword [ebp + 0x78]
cmp eax, edx
je 0x405534
mov ebx, dword [ebp + 0x80]
cmp dword [ebx + 0xc], ecx
jne 0x405514
mov edx, dword [esp + 0x4c]
mov eax, dword [ebx + 4]
cmp eax, edx
jne 0x405514
mov eax, dword [0x42db7c]
mov dword [esp + 0x24], eax
test esi, esi
je 0x40511f
mov dword [esp + 0x10], eax
mov ecx, dword [esp + 0x30]
mov eax, dword [esp + 0x50]
inc ecx
push eax
push ecx
lea edx, [esp + 0x18]
push str._d__d
push edx
mov byte [esp + 0xa0], 4
call fcn.0041a1cf
mov eax, dword [esp + 0x3c]
mov ecx, dword [esp + 0x38]
push eax
push ecx
call fcn.004037f0
mov edx, dword [esp + 0x50]
mov ecx, dword [esp + 0x28]
push eax
mov eax, dword [esp + 0x60]
and edx, 0xffff
push edx
mov edx, dword [esp + 0x40]
push eax
push ecx
push edx
lea eax, [esp + 0x50]
push str._r_n_s:___s__r_n_tCRC_t_t___08X___r_n_tChecksum_t___04X___r_n_tFluke_t_t___04X__
push eax
call fcn.0041a1cf
mov edi, dword [ebx + 0x14]
lea edx, [ebx + 0x14]
or ecx, 0xffffffff
xor eax, eax
add esp, 0x34
repne scasb al, byte es:[edi]
not ecx
dec ecx
je 0x40507d
push edx
lea ecx, [esp + 0x60]
push str._r_n_tSHA1_t_t_
push ecx
call fcn.0041e772
push str.___r_n_t
lea edx, [esp + 0x5c]
push eax
push edx
mov byte [esp + 0x9c], 5
call fcn.0041e6fe
push eax
lea ecx, [esp + 0x28]
mov byte [esp + 0x94], 6
call fcn.0041e881
lea ecx, [esp + 0x58]
mov byte [esp + 0x90], 5
call fcn.0041e4f6
mov byte [esp + 0x90], 4
lea ecx, [esp + 0x5c]
jmp 0x405104
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x28]
push eax
lea edx, [esp + 0x6c]
push ecx
push edx
call fcn.004036f0
add esp, 0xc
push eax
lea eax, [esp + 0x68]
push str._r_n_tSHA1_t_t_
push eax
mov byte [esp + 0x9c], 7
call fcn.0041e772
push str.___r_n_t
lea ecx, [esp + 0x64]
push eax
push ecx
mov byte [esp + 0x9c], 8
call fcn.0041e6fe
push eax
lea ecx, [esp + 0x28]
mov byte [esp + 0x94], 9
call fcn.0041e881
lea ecx, [esp + 0x60]
mov byte [esp + 0x90], 8
call fcn.0041e4f6
lea ecx, [esp + 0x64]
mov byte [esp + 0x90], 7
call fcn.0041e4f6
mov byte [esp + 0x90], 4
lea ecx, [esp + 0x68]
call fcn.0041e4f6
lea ecx, [esp + 0x10]
mov byte [esp + 0x90], 3
call fcn.0041e4f6
mov eax, dword [0x42db7c]
mov dword [esp + 0x18], eax
lea edx, [ebx + 0x10]
lea ecx, [esp + 0x48]
push edx
mov byte [esp + 0x94], 0xa
call fcn.0041e26b
push str.Unknown
lea ecx, [esp + 0x18]
mov byte [esp + 0x94], 0xb
call fcn.0041e564
mov eax, dword [0x42db7c]
mov dword [esp + 0x40], eax
mov eax, dword [ebp + 0x60]
mov byte [esp + 0x90], 0xd
mov dword [ebp + 0x6c], eax
mov ecx, dword [ebp + 0x64]
cmp eax, ecx
je 0x4053ec
mov esi, dword [ebp + 0x6c]
mov eax, dword [ebx]
mov ecx, dword [esi]
cmp ecx, eax
jne 0x4053d6
lea edx, [esi + 0x10]
lea ecx, [esp + 0x14]
push edx
call fcn.0041e5e3
mov edi, dword [esi + 0xc]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
je 0x4051e1
mov eax, dword [0x42db7c]
mov dword [esp + 0x10], eax
mov ecx, dword [esi + 0xc]
lea edx, [esp + 0x10]
push ecx
push str.____s
push edx
mov byte [esp + 0x9c], 0xe
call fcn.0041a1cf
add esp, 0xc
lea eax, [esp + 0x10]
lea ecx, [esp + 0x18]
push eax
call fcn.0041e881
lea ecx, [esp + 0x10]
mov byte [esp + 0x90], 0xd
call fcn.0041e4f6
mov edi, dword [esi + 0x18]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
je 0x405237
mov ecx, dword [0x42db7c]
mov dword [esp + 0x10], ecx
mov edx, dword [esi + 0x18]
lea eax, [esp + 0x10]
push edx
push str.___Source_file:__s
push eax
mov byte [esp + 0x9c], 0xf
call fcn.0041a1cf
add esp, 0xc
lea ecx, [esp + 0x10]
push ecx
lea ecx, [esp + 0x1c]
call fcn.0041e881
lea ecx, [esp + 0x10]
mov byte [esp + 0x90], 0xd
call fcn.0041e4f6
mov edi, dword [esi + 0x1c]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
je 0x40528d
mov edx, dword [0x42db7c]
mov dword [esp + 0x10], edx
mov eax, dword [esi + 0x1c]
lea ecx, [esp + 0x10]
push eax
push str.___Clone_of:__s
push ecx
mov byte [esp + 0x9c], 0x10
call fcn.0041a1cf
add esp, 0xc
lea edx, [esp + 0x10]
lea ecx, [esp + 0x18]
push edx
call fcn.0041e881
lea ecx, [esp + 0x10]
mov byte [esp + 0x90], 0xd
call fcn.0041e4f6
mov edi, dword [esi + 0x20]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
je 0x4052e2
mov eax, dword [0x42db7c]
mov dword [esp + 0x10], eax
mov ecx, dword [esi + 0x20]
lea edx, [esp + 0x10]
push ecx
push str.___Rom_of:__s
push edx
mov byte [esp + 0x9c], 0x11
call fcn.0041a1cf
add esp, 0xc
lea eax, [esp + 0x10]
lea ecx, [esp + 0x18]
push eax
call fcn.0041e881
lea ecx, [esp + 0x10]
mov byte [esp + 0x90], 0xd
call fcn.0041e4f6
mov edi, dword [esi + 0x14]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
je 0x405399
mov ecx, dword [0x42db7c]
mov dword [esp + 0x10], ecx
mov eax, dword [esi + 4]
mov byte [esp + 0x90], 0x12
test eax, eax
jbe 0x405327
mov edx, dword [esi + 0x14]
push eax
push edx
lea eax, [esp + 0x18]
push str._s__d
push eax
call fcn.0041a1cf
add esp, 0x10
jmp 0x40533d
mov ecx, dword [esi + 0x14]
lea edx, [esp + 0x10]
push ecx
push 0x42d6ac
push edx
call fcn.0041a1cf
add esp, 0xc
mov eax, dword [esi + 8]
test eax, eax
jne 0x405352
push str._MAME
lea ecx, [esp + 0x14]
call fcn.0041e845
cmp dword [esi + 8], 1
jne 0x405366
push str._RI
lea ecx, [esp + 0x14]
call fcn.0041e845
cmp dword [esi + 8], 2
jne 0x40537a
push str._CUSTOM
lea ecx, [esp + 0x14]
call fcn.0041e845
lea eax, [esp + 0x10]
lea ecx, [esp + 0x40]
push eax
call fcn.0041e881
lea ecx, [esp + 0x10]
mov byte [esp + 0x90], 0xd
call fcn.0041e4f6
mov eax, dword [ebx + 8]
test eax, eax
jne 0x4053ae
push str._MAME
lea ecx, [esp + 0x18]
call fcn.0041e845
cmp dword [ebx + 8], 1
jne 0x4053c2
push str._RI
lea ecx, [esp + 0x18]
call fcn.0041e845
cmp dword [ebx + 8], 2
jne 0x4053d6
push str._CUSTOM
lea ecx, [esp + 0x18]
call fcn.0041e845
mov edx, dword [ebp + 0x6c]
add edx, 0x24
mov dword [ebp + 0x6c], edx
mov ecx, dword [ebp + 0x64]
mov eax, edx
cmp eax, ecx
jne 0x405170
mov ecx, dword [0x42db7c]
mov dword [esp + 0x3c], ecx
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x48]
push edx
push eax
lea ecx, [esp + 0x44]
push str._r_n_t_s_:__s
push ecx
mov byte [esp + 0xa0], 0x13
call fcn.0041a1cf
add esp, 0x10
lea edx, [esp + 0x40]
lea eax, [esp + 0x24]
lea ecx, [esp + 0x74]
push edx
push eax
push ecx
call fcn.0041e698
lea edx, [esp + 0x3c]
mov byte [esp + 0x90], 0x14
push edx
push eax
lea eax, [esp + 0x78]
push eax
call fcn.0041e698
lea ecx, [esp + 0x18]
lea edx, [esp + 0x6c]
push ecx
push eax
push edx
mov byte [esp + 0x9c], 0x15
call fcn.0041e698
push eax
lea ecx, [esp + 0x20]
mov byte [esp + 0x94], 0x16
call fcn.0041e881
lea ecx, [esp + 0x6c]
mov byte [esp + 0x90], 0x15
call fcn.0041e4f6
lea ecx, [esp + 0x70]
mov byte [esp + 0x90], 0x14
call fcn.0041e4f6
lea ecx, [esp + 0x74]
mov byte [esp + 0x90], 0x13
call fcn.0041e4f6
lea ecx, [esp + 0x3c]
mov edi, 1
xor esi, esi
mov byte [esp + 0x90], 0xd
call fcn.0041e4f6
lea ecx, [esp + 0x40]
mov byte [esp + 0x90], 0xc
call fcn.0041e4f6
lea ecx, [esp + 0x14]
mov byte [esp + 0x90], 0xb
call fcn.0041e4f6
lea ecx, [esp + 0x48]
mov byte [esp + 0x90], 0xa
call fcn.0041e4f6
lea ecx, [esp + 0x18]
mov byte [esp + 0x90], 3
call fcn.0041e4f6
lea ecx, [esp + 0x24]
mov byte [esp + 0x90], 2
call fcn.0041e4f6
mov ecx, dword [esp + 0x44]
mov ebx, dword [ebp + 0x80]
add ebx, 0x18
mov dword [ebp + 0x80], ebx
mov edx, dword [ebp + 0x78]
mov eax, ebx
cmp eax, edx
jne 0x404f7e
mov ebx, dword [esp + 0x4c]
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x50]
inc eax
cmp eax, ecx
mov dword [esp + 0x30], eax
jl 0x404e89
mov esi, dword [esp + 0x44]
mov ecx, dword [esp + 0x54]
mov eax, dword [ebp + 0x1f4]
inc ecx
cmp ecx, eax
mov dword [esp + 0x54], ecx
jl 0x404e60
test edi, edi
jne 0x40561e
mov eax, dword [0x42db7c]
mov dword [esp + 0x30], eax
mov al, byte [esp + 0x34]
mov byte [esp + 0x90], 0x17
cmp al, 0xff
jne 0x40559f
mov ecx, dword [esp + 0x20]
push esi
push ecx
lea edx, [esp + 0x38]
push str._r_n_s:__X__Not_Found_
push edx
call fcn.0041a1cf
add esp, 0x10
jmp 0x4055ff
mov eax, dword [esp + 0x34]
and eax, 0xff
mov ecx, eax
mov edx, eax
and ecx, 1
push ecx
mov ecx, eax
shr edx, 1
shr ecx, 2
and edx, 1
and ecx, 1
push edx
push ecx
mov edx, eax
mov ecx, eax
shr edx, 3
shr ecx, 4
and edx, 1
and ecx, 1
push edx
push ecx
mov edx, eax
mov ecx, eax
shr edx, 5
shr ecx, 6
and edx, 1
and ecx, 1
push edx
mov edx, dword [esp + 0x38]
shr eax, 7
push ecx
push eax
push esi
push edx
lea eax, [esp + 0x58]
push str._r_n_s:__X__Not_Found__r_n_t_warning_some_unused_bits___d_d_d_d_d_d_d_d__possible_bad_ROM.
push eax
call fcn.0041a1cf
add esp, 0x30
lea ecx, [esp + 0x30]
push ecx
lea ecx, [esp + 0x20]
call fcn.0041e881
lea ecx, [esp + 0x30]
mov byte [esp + 0x90], 2
call fcn.0041e4f6
mov edx, dword [esp + 0x28]
push edx
call fcn.0041e973
add esp, 4
mov ecx, ebp
push 1
call fcn.0041d246
lea esi, [ebp + 0x1e8]
lea eax, [esp + 0x1c]
push eax
mov ecx, esi
call fcn.0041e881
push 0x42d610
mov ecx, esi
call fcn.0041e845
push 0
mov ecx, ebp
call fcn.0041d246
lea ecx, [esp + 0x1c]
mov byte [esp + 0x90], 1
call fcn.0041e4f6
xor edi, edi
push 1
lea ecx, [ebp + 0x130]
call fcn.0041dd14
lea ecx, [esp + 0x20]
mov byte [esp + 0x90], 0
call fcn.0041e4f6
mov ecx, dword [ebp + 0x188]
mov esi, dword [sym.imp.USER32.dll_SendMessageA]
push edi
push edi
push 0xba
push ecx
call esi
cmp eax, 0x10
jle 0x4056ba
mov edx, dword [ebp + 0x188]
add eax, 0xfffffff0
push eax
push edi
push 0xb6
push edx
call esi
lea ecx, [esp + 0x78]
mov dword [esp + 0x90], 0xffffffff
call fcn.0041f305
mov ecx, dword [esp + 0x88]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x84
ret 4