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

Disassembly:
sub esp, 0xccc
push ebx
push ebp
push esi
push edi
mov dword [esp + 0x24], ecx
mov dword [esp + 0x30], 0
mov ebp, dword [esp + 0xce0]
mov ebx, 1
push ebp
push ebx
lea eax, [esp + 0x3c]
push 0x10
push eax
call fcn.00436b8f
add esp, 0x10
cmp eax, ebx
jne 0x42bcfc
mov eax, dword [esp + 0x30]
test eax, eax
jne 0x42b2b4
mov ecx, 3
mov edi, str.VirtuaNES_ST
lea esi, [esp + 0x34]
xor edx, edx
repe cmpsd dword [esi], dword es:[edi]
jne 0x42bb32
mov ax, word [esp + 0x42]
cmp ax, 0x100
jne 0x42b1cf
mov eax, dword [esp + 0x24]
mov ecx, dword [eax + 0x7c]
test ecx, ecx
jne 0x42bb23
mov eax, dword [eax + 0x14]
cmp dword [eax + 0xbc], 0x14
je 0x42baaf
mov dword [esp + 0x30], ebx
jmp case.default.0x42b379
cmp ax, 0x200
je 0x42b1df
cmp ax, 0x210
jne 0x42b2ab
push ebx
push 0xfffffffffffffff0
push ebp
call fcn.0043779d
add esp, 0xc
test eax, eax
jne 0x42bacc
push ebp
push ebx
lea ecx, [esp + 0x14c]
push 0x20
push ecx
call fcn.00436b8f
add esp, 0x10
cmp eax, ebx
jne 0x42bae9
mov ecx, dword [esp + 0x24]
mov edx, dword [ecx + 0x7c]
test edx, edx
jne 0x42b228
mov eax, dword [ecx + 0x80]
test eax, eax
je 0x42b2ab
test byte [ecx + 0xac], 0x80
je 0x42bb23
mov esi, dword [esp + 0x160]
test esi, esi
je 0x42bb23
mov eax, dword [esp + 0x15c]
test eax, eax
je 0x42bb23
test edx, edx
je 0x42b265
cmp eax, dword [ecx + 0xd4]
jg 0x42bb23
jmp 0x42b271
cmp eax, dword [ecx + 0xe4]
jg 0x42bb23
mov edx, dword [ecx + 0x98]
mov dword [ecx + 0xe4], eax
mov eax, dword [ecx + 0xb8]
push 0
inc eax
push esi
push edx
mov dword [ecx + 0x7c], 0
mov dword [ecx + 0x80], ebx
mov dword [ecx + 0xb8], eax
call fcn.0043779d
add esp, 0xc
test eax, eax
jne 0x42bb06
mov dword [esp + 0x30], ebx
jmp case.default.0x42b379
or eax, 0xffffffff
mov ecx, 2
mov edi, str.REG_DATA
lea esi, [esp + 0x34]
xor edx, edx
repe cmpsd dword [esi], dword es:[edi]
jne 0x42b2cd
xor eax, eax
mov ecx, 2
mov edi, str.RAM_DATA
lea esi, [esp + 0x34]
xor edx, edx
repe cmpsd dword [esi], dword es:[edi]
jne 0x42b2e3
mov eax, ebx
mov ecx, 2
mov edi, str.MMU_DATA
lea esi, [esp + 0x34]
xor edx, edx
repe cmpsd dword [esi], dword es:[edi]
jne 0x42b2fc
mov eax, 2
mov ecx, 2
mov edi, str.MMC_DATA
lea esi, [esp + 0x34]
xor edx, edx
repe cmpsd dword [esi], dword es:[edi]
jne 0x42b315
mov eax, 3
mov ecx, 2
mov edi, str.CTR_DATA
lea esi, [esp + 0x34]
xor edx, edx
repe cmpsd dword [esi], dword es:[edi]
jne 0x42b32e
mov eax, 4
mov ebx, dword [esp + 0x24]
mov edx, dword [ebx + 0x14]
cmp dword [edx + 0xbc], 0x14
jne 0x42b367
mov ecx, 2
mov edi, str.DISKDATA
lea esi, [esp + 0x34]
xor ebp, ebp
repe cmpsd dword [esi], dword es:[edi]
jne 0x42b360
mov ebp, dword [esp + 0xce0]
mov eax, 5
jmp switch.0x0042b379
mov ebp, dword [esp + 0xce0]
cmp eax, 0xffffffff
je 0x42bcfc
cmp eax, 5
ja case.default.0x42b379
jmp dword [eax*4 + 0x42bd10]
cmp word [esp + 0x3e], 0x200
push ebp
push 1
jae 0x42b4ef
lea eax, [esp + 0x16c]
push 0x158
push eax
call fcn.00436b8f
add esp, 0x10
cmp eax, 1
jne 0x42bb4f
mov dl, byte [esp + 0x166]
mov cx, word [esp + 0x164]
mov al, byte [esp + 0x167]
mov byte [esp + 0x1e], dl
mov dl, byte [esp + 0x169]
mov word [esp + 0x1c], cx
mov cl, byte [esp + 0x168]
mov byte [esp + 0x20], al
mov al, byte [esp + 0x16a]
mov byte [esp + 0x22], dl
mov edx, dword [ebx + 8]
mov byte [esp + 0x21], cl
mov cl, byte [esp + 0x16b]
mov byte [esp + 0x1f], al
mov eax, dword [esp + 0x1c]
mov byte [esp + 0x23], cl
mov ecx, dword [esp + 0x20]
mov dword [edx + 0x10], eax
mov dword [edx + 0x14], ecx
mov ax, word [esp + 0x3e]
mov dl, byte [esp + 0x16c]
cmp ax, 0x110
mov byte [0x4e9230], dl
jae 0x42b43e
xor eax, eax
mov dword [ebx + 0x58], eax
mov dword [ebx + 0x5c], eax
mov eax, dword [esp + 0x170]
cdq
mov dword [ebx + 0x50], eax
mov dword [ebx + 0x54], edx
jmp 0x42b472
jne 0x42b472
mov eax, dword [esp + 0x170]
mov ecx, dword [esp + 0x174]
mov edx, dword [esp + 0x178]
mov dword [ebx + 0x40], eax
mov eax, dword [esp + 0x17c]
mov dword [ebx + 0x58], ecx
mov ecx, dword [esp + 0x180]
mov dword [ebx + 0x50], eax
mov dword [ebx + 0x5c], edx
mov dword [ebx + 0x54], ecx
mov dl, byte [esp + 0x184]
mov al, byte [esp + 0x185]
mov cl, byte [esp + 0x186]
mov byte [0x50e430], dl
mov dl, byte [esp + 0x187]
mov byte [0x50e431], al
mov al, byte [esp + 0x188]
mov byte [0x50e432], cl
mov cx, word [esp + 0x18a]
mov byte [0x50e433], dl
mov dx, word [esp + 0x18c]
mov byte [0x50e2d8], al
mov ax, word [esp + 0x18e]
mov word [0x50c2ac], cx
mov cl, byte [esp + 0x189]
mov word [0x50c2ae], dx
mov word [0x50c2b0], ax
mov byte [0x50e400], cl
jmp 0x42b642
lea edx, [esp + 0x88]
push 0x60
push edx
call fcn.00436b8f
add esp, 0x10
cmp eax, 1
jne 0x42bb6c
mov cl, byte [esp + 0x82]
mov ax, word [esp + 0x80]
mov dl, byte [esp + 0x83]
mov byte [esp + 0x16], cl
mov cl, byte [esp + 0x85]
mov word [esp + 0x14], ax
mov al, byte [esp + 0x84]
mov byte [esp + 0x18], dl
mov dl, byte [esp + 0x86]
mov byte [esp + 0x1a], cl
mov ecx, dword [ebx + 8]
mov byte [esp + 0x19], al
mov al, byte [esp + 0x87]
mov byte [esp + 0x17], dl
mov edx, dword [esp + 0x14]
mov byte [esp + 0x1b], al
mov eax, dword [esp + 0x18]
mov dword [ecx + 0x10], edx
xor edx, edx
mov dword [ecx + 0x14], eax
mov cl, byte [esp + 0x88]
mov eax, dword [esp + 0x8c]
mov byte [0x4e9230], cl
mov cl, byte [esp + 0x89]
mov dword [ebx + 0x40], eax
mov eax, dword [esp + 0x9c]
test cl, cl
mov ecx, dword [esp + 0x94]
mov dword [ebx + 0x50], eax
setne dl
mov dword [ebx + 0x3c], edx
mov edx, dword [esp + 0x98]
mov dword [ebx + 0x58], ecx
mov ecx, dword [esp + 0xa0]
mov dword [ebx + 0x5c], edx
mov edx, dword [esp + 0x90]
mov dword [ebx + 0x54], ecx
mov ecx, dword [ebx + 8]
push edx
call fcn.00423510
mov al, byte [esp + 0xc0]
mov cl, byte [esp + 0xc1]
mov dl, byte [esp + 0xc2]
mov byte [0x50e430], al
mov al, byte [esp + 0xc3]
mov byte [0x50e431], cl
mov cl, byte [esp + 0xc4]
mov byte [0x50e432], dl
mov dx, word [esp + 0xc6]
mov byte [0x50e433], al
mov ax, word [esp + 0xc8]
mov byte [0x50e2d8], cl
mov cx, word [esp + 0xca]
mov word [0x50c2ac], dx
mov dl, byte [esp + 0xc5]
mov word [0x50c2ae], ax
mov word [0x50c2b0], cx
mov byte [0x50e400], dl
mov esi, 0x4010
mov ecx, dword [ebx + 0x10]
push 0
push esi
call fcn.00422740
inc esi
cmp esi, 0x4013
jle 0x42b647
jmp case.default.0x42b379
push ebp
push 1
lea eax, [esp + 0x3c4]
push 0x920
push eax
call fcn.00436b8f
add esp, 0x10
cmp eax, 1
jne 0x42bb89
mov edx, dword [esp + 0xbc0]
mov ecx, 0x200
lea esi, [esp + 0x3bc]
mov edi, 0x50c2c4
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [esp + 0xbbc]
mov eax, dword [esp + 0xbc4]
mov dword [0x50e3f0], ecx
mov ecx, dword [esp + 0xbc8]
mov dword [0x50e3f4], edx
mov edx, dword [esp + 0xbcc]
mov dword [0x50e3fc], ecx
mov ecx, dword [esp + 0xbd4]
mov dword [0x50e3f8], eax
mov eax, dword [esp + 0xbd0]
mov dword [0x50e420], edx
mov edx, dword [esp + 0xbd8]
mov dword [0x50e428], ecx
mov ecx, 0x40
lea esi, [esp + 0xbdc]
mov edi, 0x50e438
mov dword [0x50e424], eax
mov dword [0x50e42c], edx
rep movsd dword es:[edi], dword [esi]
mov eax, dword [ebx + 0x14]
test byte [eax + 0xa], 2
je case.default.0x42b379
mov ecx, dword [ebx + 0x64]
push ebp
push 1
push ecx
push 0x4ea2ac
call fcn.00436b8f
add esp, 0x10
cmp eax, 1
jne 0x42bba6
jmp case.default.0x42b379
push ebp
push 1
lea edx, [esp + 0x108]
push 0x44
push edx
call fcn.00436b8f
add esp, 0x10
cmp eax, 1
jne 0x42bbc3
mov ax, word [esp + 0x3e]
cmp ax, 0x100
jne 0x42b823
mov al, byte [esp + 0x103]
cmp al, 0xff
je 0x42b79b
cmp al, 1
je 0x42b79b
mov eax, dword [ebx + 0x14]
test byte [eax + 0xa], 2
jne 0x42b7bb
mov ecx, dword [esp + 0x10e]
and ecx, 0xffff
push ecx
push 3
call fcn.004289e0
add esp, 8
jmp 0x42b7bb
mov edx, dword [0x4e9260]
push ebp
push 1
push 0x2000
push edx
call fcn.00436b8f
add esp, 0x10
cmp eax, 1
jne 0x42bbe0
xor esi, esi
lea edi, [esp + 0x110]
xor ebx, ebx
mov cl, byte [esp + ebx + 0x104]
xor eax, eax
mov ax, word [edi]
mov byte [ebx + 0x50c2b8], cl
test cl, cl
mov dword [esi + 0x4e9244], eax
jne 0x42b7f2
push eax
mov al, bl
add al, 4
push eax
call fcn.004289e0
add esp, 8
jmp 0x42b812
mov ecx, dword [esi + 0x4e9264]
push ebp
push 1
push 0x2000
push ecx
call fcn.00436b8f
add esp, 0x10
cmp eax, 1
jne 0x42bbfd
inc ebx
add edi, 2
add esi, 4
lea edx, [ebx + 4]
cmp edx, 8
jl 0x42b7c6
jmp 0x42b88f
cmp ax, 0x200
jne 0x42b88f
xor esi, esi
lea edi, [esp + 0x10e]
xor ebx, ebx
mov cl, byte [esp + ebx + 0x103]
xor eax, eax
mov ax, word [edi]
mov byte [ebx + 0x50c2b7], cl
test cl, cl
mov dword [esi + 0x4e9240], eax
jne 0x42b860
push eax
mov al, bl
add al, 3
push eax
call fcn.004289e0
add esp, 8
jmp 0x42b880
mov ecx, dword [esi + 0x4e9260]
push ebp
push 1
push 0x2000
push ecx
call fcn.00436b8f
add esp, 0x10
cmp eax, 1
jne 0x42bc1a
inc ebx
add edi, 2
add esi, 4
lea edx, [ebx + 3]
cmp edx, 8
jl 0x42b834
push ebp
push 1
push 0x1000
push 0x4e9274
call fcn.00436b8f
add esp, 0x10
cmp eax, 1
jne 0x42bc37
xor edi, edi
mov esi, 0x4d7200
mov al, byte [esp + edi + 0x13c]
test al, al
je 0x42b8d9
push ebp
push 1
push 0x1000
push esi
call fcn.00436b8f
add esp, 0x10
cmp eax, 1
jne 0x42bc54
add esi, 0x1000
inc edi
cmp esi, 0x4df200
jl 0x42b8b4
xor esi, esi
lea edi, [esp + 0x124]
mov al, byte [esp + esi + 0x118]
test al, al
jne 0x42b90a
xor eax, eax
mov ax, word [edi]
push eax
push esi
call fcn.00428a60
jmp 0x42b930
cmp al, 1
jne 0x42b91c
xor ecx, ecx
mov cx, word [edi]
push ecx
push esi
call fcn.00428ac0
jmp 0x42b930
cmp al, 0x80
jne 0x42bc71
xor edx, edx
mov dx, word [edi]
push edx
push esi
call fcn.00428b20
add esp, 8
inc esi
add edi, 2
cmp esi, 0xc
jl 0x42b8f1
jmp case.default.0x42b379
push ebp
push 1
lea eax, [esp + 0x2c4]
push 0x100
push eax
call fcn.00436b8f
add esp, 0x10
cmp eax, 1
jne 0x42bc88
mov ecx, dword [ebx + 0x1c]
lea eax, [esp + 0x2bc]
push eax
mov edx, dword [ecx]
call dword [edx + 0x48]
jmp case.default.0x42b379
push ebp
push 1
lea ecx, [esp + 0xe8]
push 0x20
push ecx
call fcn.00436b8f
add esp, 0x10
cmp eax, 1
jne 0x42bca5
mov edx, dword [ebx + 0x18]
mov eax, dword [esp + 0xe0]
mov dword [edx + 4], eax
mov ecx, dword [ebx + 0x18]
mov edx, dword [esp + 0xe4]
mov dword [ecx + 8], edx
mov eax, dword [ebx + 0x18]
mov ecx, dword [esp + 0xe8]
mov dword [eax + 0xc], ecx
mov edx, dword [ebx + 0x18]
mov eax, dword [esp + 0xec]
xor ecx, ecx
mov dword [edx + 0x10], eax
mov al, byte [esp + 0xf0]
mov edx, dword [ebx + 0x18]
test al, al
setne cl
mov dword [edx + 0x50], ecx
jmp case.default.0x42b379
mov eax, dword [edx + 0xc0]
mov ebp, dword [edx + 0x94]
mov ecx, eax
mov esi, dword [edx + 0xa4]
shl ecx, 0xb
sub ecx, eax
mov edi, esi
shl ecx, 3
sub ecx, eax
xor eax, eax
lea ebx, [ecx*4 + 0x10]
mov ecx, ebx
mov edx, ecx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [esp + 0xce0]
lea ecx, [esp + 0x10]
push eax
push 1
push 4
push ecx
call fcn.00436b8f
add esp, 0x10
cmp eax, 1
jne 0x42bcc2
mov eax, dword [esp + 0x10]
mov dword [esp + 0x2c], 0
test eax, eax
jle case.default.0x42b379
mov edi, dword [esp + 0xce0]
push edi
push 1
lea edx, [esp + 0x30]
push 4
push edx
call fcn.00436b8f
add esp, 0x10
cmp eax, 1
jne 0x42bcdf
mov eax, dword [esp + 0x28]
mov ecx, eax
and eax, 0xffffff
shr ecx, 0x18
cmp eax, 0x10
mov dword [esp + 0x28], eax
jb 0x42ba99
cmp eax, ebx
jae 0x42ba99
mov byte [eax + ebp], cl
mov eax, dword [esp + 0x28]
mov byte [eax + esi], 0xff
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x10]
inc eax
cmp eax, ecx
mov dword [esp + 0x2c], eax
jl 0x42ba58
jmp case.default.0x42b379
push 0x11
call fcn.004011d0
add esp, 4
lea ecx, [esp + 0x10]
mov dword [esp + 0x10], eax
push 0x443a58
push ecx
call fcn.00436a94
push 5
call fcn.004011d0
add esp, 4
lea edx, [esp + 0x10]
mov dword [esp + 0x10], eax
push 0x443a58
push edx
call fcn.00436a94
push 5
call fcn.004011d0
add esp, 4
mov dword [esp + 0x10], eax
lea eax, [esp + 0x10]
push 0x443a58
push eax
call fcn.00436a94
push 5
call fcn.004011d0
add esp, 4
lea ecx, [esp + 0x10]
mov dword [esp + 0x10], eax
push 0x443a58
push ecx
call fcn.00436a94
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0xccc
ret 4
push 0x11
call fcn.004011d0
add esp, 4
lea edx, [esp + 0x10]
mov dword [esp + 0x10], eax
push 0x443a58
push edx
call fcn.00436a94
push 5
call fcn.004011d0
add esp, 4
mov dword [esp + 0x74], eax
lea eax, [esp + 0x74]
push 0x443a58
push eax
call fcn.00436a94
push 5
call fcn.004011d0
add esp, 4
lea ecx, [esp + 0x50]
mov dword [esp + 0x50], eax
push 0x443a58
push ecx
call fcn.00436a94
push 5
call fcn.004011d0
add esp, 4
lea edx, [esp + 0x58]
mov dword [esp + 0x58], eax
push 0x443a58
push edx
call fcn.00436a94
push 5
call fcn.004011d0
add esp, 4
mov dword [esp + 0x60], eax
lea eax, [esp + 0x60]
push 0x443a58
push eax
call fcn.00436a94
push 5
call fcn.004011d0
add esp, 4
lea ecx, [esp + 0x4c]
mov dword [esp + 0x4c], eax
push 0x443a58
push ecx
call fcn.00436a94
push 5
call fcn.004011d0
add esp, 4
lea edx, [esp + 0x78]
mov dword [esp + 0x78], eax
push 0x443a58
push edx
call fcn.00436a94
push 5
call fcn.004011d0
add esp, 4
mov dword [esp + 0x54], eax
lea eax, [esp + 0x54]
push 0x443a58
push eax
call fcn.00436a94
push 5
call fcn.004011d0
add esp, 4
lea ecx, [esp + 0x68]
mov dword [esp + 0x68], eax
push 0x443a58
push ecx
call fcn.00436a94
push 5
call fcn.004011d0
add esp, 4
lea edx, [esp + 0x5c]
mov dword [esp + 0x5c], eax
push 0x443a58
push edx
call fcn.00436a94
push 5
call fcn.004011d0
add esp, 4
mov dword [esp + 0x44], eax
lea eax, [esp + 0x44]
push 0x443a58
push eax
call fcn.00436a94
lea ecx, [esp + 0x64]
push 0x443a58
push ecx
mov dword [esp + 0x6c], str.Unknown_bank_types.
call fcn.00436a94
push 5
call fcn.004011d0
add esp, 4
lea edx, [esp + 0x7c]
mov dword [esp + 0x7c], eax
push 0x443a58
push edx
call fcn.00436a94
push 5
call fcn.004011d0
add esp, 4
mov dword [esp + 0x70], eax
lea eax, [esp + 0x70]
push 0x443a58
push eax
call fcn.00436a94
push 5
call fcn.004011d0
add esp, 4
lea ecx, [esp + 0x6c]
mov dword [esp + 0x6c], eax
push 0x443a58
push ecx
call fcn.00436a94
push 5
call fcn.004011d0
add esp, 4
lea edx, [esp + 0x48]
mov dword [esp + 0x48], eax
push 0x443a58
push edx
call fcn.00436a94
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0xccc
ret 4