Function at 0x406670
Capabilities:
Check for time delay via gettickcount
Resolve function by parsing pe exports

Disassembly:
push 0xffffffffffffffff
mov eax, dword fs:[0]
push 0x42414c
push eax
mov eax, 0x20f0
mov dword fs:[0], esp
call fcn.00409a80
push ebx
push ebp
push esi
push edi
mov ebp, ecx
call dword [sym.imp.KERNEL32.dll_GetTickCount]
xor ebx, ebx
lea ecx, [esp + 0xf0]
mov dword [esp + 0xe0], eax
mov dword [esp + 0x2c], ebx
mov dword [esp + 0xa4], ebx
call fcn.0041f2b0
mov eax, dword [ebp + 0xa8]
push 0x42f460
push eax
mov dword [esp + 0x2110], ebx
mov dword [esp + 0x40], ebx
mov dword [esp + 0x48], ebx
mov dword [esp + 0x50], ebx
call fcn.0040997a
add esp, 8
test eax, eax
je 0x4070ca
mov eax, dword [ebp + 0xa8]
push 0x42da30
push eax
call fcn.00409967
mov edi, eax
add esp, 8
cmp edi, ebx
mov dword [esp + 0x88], edi
je 0x4070ca
push 2
push ebx
push edi
call fcn.0040987d
push edi
call fcn.004096fa
push ebx
push ebx
push edi
mov dword [esp + 0xf4], eax
call fcn.0040987d
push edi
lea eax, [esp + 0x120]
push 0x2000
push eax
call fcn.00409698
push 5
lea ecx, [esp + 0x12c]
push str.__xml
push ecx
call fcn.00409660
add esp, 0x34
test eax, eax
jne 0x4070aa
mov eax, dword [0x42db7c]
mov dword [esp + 0x24], eax
mov dword [esp + 0x14], eax
mov dword [esp + 0x44], eax
mov dword [esp + 0x3c], eax
mov dword [esp + 0x34], eax
mov dword [esp + 0xb4], eax
mov dword [esp + 0xb0], eax
mov dword [esp + 0xb8], eax
mov dword [esp + 0xac], eax
mov dword [esp + 0x98], ebx
mov dword [esp + 0x70], eax
mov dword [esp + 0x74], eax
mov dword [esp + 0x78], eax
mov dword [esp + 0x7c], eax
mov dword [esp + 0x80], eax
mov dword [esp + 0x84], eax
mov dword [esp + 0x5c], eax
mov dword [esp + 0x60], eax
push edi
lea edx, [esp + 0x104]
or esi, 0xffffffff
push 0x2000
push edx
mov byte [esp + 0x2114], 0xb
mov dword [esp + 0x70], esi
mov dword [esp + 0x58], esi
mov dword [esp + 0xac], ebx
call fcn.00409698
add esp, 0xc
test eax, eax
je 0x406f6c
mov bl, 0xf
mov eax, dword [esp + 0xa0]
inc eax
cmp eax, 0x2710
mov dword [esp + 0xa0], eax
jb 0x4068e8
push edi
call fcn.004096fa
mov dword [esp + 0xc8], eax
mov eax, dword [esp + 0xdc]
xor edi, edi
mov dword [esp + 0xc0], eax
mov dword [esp + 0xcc], edi
mov dword [esp + 0xc4], edi
fild qword [esp + 0xc8]
fild qword [esp + 0xc0]
add esp, 4
mov dword [esp + 0xa0], edi
fdivp st(1)
push edi
fmul dword [0x425c24]
call fcn.00409ab0
mov ecx, dword [ebp + 0x110]
push eax
push 0x402
push ecx
call dword [sym.imp.USER32.dll_SendMessageA]
mov ecx, dword [esp + 0x40]
mov eax, dword [esp + 0x38]
mov dword [ebp + 0x94], ecx
mov dword [ebp + 0x98], eax
mov edx, dword [0x42db7c]
mov dword [esp + 0xa8], edx
push ecx
push eax
lea eax, [esp + 0xb0]
push str.Games:__d_nROMs:__d
push eax
mov byte [esp + 0x2118], 0xc
call fcn.0041a1cf
add esp, 0x10
lea ecx, [esp + 0xa8]
push ecx
lea ecx, [ebp + 0x1fc]
call fcn.0041e5e3
push edi
mov ecx, ebp
call fcn.0041d246
lea ecx, [esp + 0xa8]
mov byte [esp + 0x2108], 0xb
call fcn.0041e4f6
mov edi, dword [esp + 0x24]
mov ecx, esi
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
jne 0x406994
push 0x22
push ecx
mov ecx, esp
mov dword [esp + 0x18], esp
push str._machine_name_
call fcn.0041e564
push ecx
lea edx, [esp + 0x10c]
mov ecx, esp
mov dword [esp + 0x24], esp
push edx
mov byte [esp + 0x2118], 0xd
call fcn.0041e564
lea eax, [esp + 0xa0]
mov byte [esp + 0x2114], 0xb
push eax
call fcn.00406590
add esp, 0x10
mov edi, dword [esp + 0x94]
mov ecx, esi
xor eax, eax
mov byte [esp + 0x2108], 0xe
repne scasb al, byte es:[edi]
not ecx
dec ecx
je 0x406980
lea ecx, [esp + 0x94]
mov dword [esp + 0x98], 1
push ecx
lea ecx, [esp + 0x74]
call fcn.0041e5e3
mov edx, dword [esp + 0x38]
mov dword [esp + 0x64], edx
lea ecx, [esp + 0x94]
mov byte [esp + 0x2108], 0xb
call fcn.0041e4f6
mov eax, dword [esp + 0x98]
test eax, eax
je 0x406e1c
mov eax, dword [0x42db7c]
mov dword [esp + 0x10], eax
mov edi, dword [esp + 0x44]
mov ecx, esi
xor eax, eax
mov byte [esp + 0x2108], bl
repne scasb al, byte es:[edi]
not ecx
dec ecx
jne 0x406a4e
push 0x3c
push ecx
mov ecx, esp
mov dword [esp + 0x20], esp
push str._description_
call fcn.0041e564
push ecx
lea edx, [esp + 0x10c]
mov ecx, esp
mov dword [esp + 0x28], esp
push edx
mov byte [esp + 0x2118], 0x10
call fcn.0041e564
lea eax, [esp + 0xf4]
mov byte [esp + 0x2114], bl
push eax
call fcn.00406590
add esp, 0x10
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x210c], 0x11
call fcn.0041e5e3
lea ecx, [esp + 0xe8]
mov byte [esp + 0x2108], bl
call fcn.0041e4f6
mov edi, dword [esp + 0x10]
mov ecx, esi
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
je 0x406a4e
lea ecx, [esp + 0x10]
push ecx
lea ecx, [esp + 0x78]
call fcn.0041e5e3
push 0x22
push ecx
mov ecx, esp
mov dword [esp + 0x24], esp
push str.sourcefile_
call fcn.0041e564
push ecx
lea edx, [esp + 0x10c]
mov ecx, esp
mov dword [esp + 0x24], esp
push edx
mov byte [esp + 0x2118], 0x12
call fcn.0041e564
lea eax, [esp + 0xe0]
mov byte [esp + 0x2114], bl
push eax
call fcn.00406590
add esp, 0x10
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x210c], 0x13
call fcn.0041e5e3
lea ecx, [esp + 0xd4]
mov byte [esp + 0x2108], bl
call fcn.0041e4f6
mov edi, dword [esp + 0x10]
mov ecx, esi
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
je 0x406ad9
lea ecx, [esp + 0x10]
push ecx
lea ecx, [esp + 0x80]
call fcn.0041e5e3
push 0x3c
push ecx
mov ecx, esp
mov dword [esp + 0x24], esp
push str._manufacturer_
call fcn.0041e564
push ecx
lea edx, [esp + 0x10c]
mov ecx, esp
mov dword [esp + 0x24], esp
push edx
mov byte [esp + 0x2118], 0x14
call fcn.0041e564
lea eax, [esp + 0xf8]
mov byte [esp + 0x2114], bl
push eax
call fcn.00406590
add esp, 0x10
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x210c], 0x15
call fcn.0041e5e3
lea ecx, [esp + 0xec]
mov byte [esp + 0x2108], bl
call fcn.0041e4f6
mov edi, dword [esp + 0x10]
mov ecx, esi
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
je 0x406b61
lea ecx, [esp + 0x10]
push ecx
lea ecx, [esp + 0x7c]
call fcn.0041e5e3
push 0x3c
push ecx
mov ecx, esp
mov dword [esp + 0x24], esp
push str._year_
call fcn.0041e564
push ecx
lea edx, [esp + 0x10c]
mov ecx, esp
mov dword [esp + 0x24], esp
push edx
mov byte [esp + 0x2118], 0x16
call fcn.0041e564
lea eax, [esp + 0xe8]
mov byte [esp + 0x2114], bl
push eax
call fcn.00406590
add esp, 0x10
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x210c], 0x17
call fcn.0041e5e3
lea ecx, [esp + 0xdc]
mov byte [esp + 0x2108], bl
call fcn.0041e4f6
mov edx, dword [esp + 0x10]
mov ecx, esi
mov edi, edx
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
je 0x406bea
push edx
call fcn.00409648
add esp, 4
mov dword [esp + 0x68], eax
push 0x22
push ecx
mov ecx, esp
mov dword [esp + 0x24], esp
push str._rom_name_
call fcn.0041e564
push ecx
lea edx, [esp + 0x10c]
mov ecx, esp
mov dword [esp + 0x24], esp
push edx
mov byte [esp + 0x2118], 0x18
call fcn.0041e564
lea eax, [esp + 0xf0]
mov byte [esp + 0x2114], bl
push eax
call fcn.00406590
add esp, 0x10
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x210c], 0x19
call fcn.0041e5e3
lea ecx, [esp + 0xe4]
mov byte [esp + 0x2108], bl
call fcn.0041e4f6
mov edi, dword [esp + 0x10]
mov ecx, esi
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
je 0x406c7a
lea ecx, [esp + 0x10]
push ecx
lea ecx, [esp + 0x60]
call fcn.0041e5e3
mov edx, dword [esp + 0x64]
mov dword [esp + 0x4c], edx
push 0x22
push ecx
mov ecx, esp
mov dword [esp + 0x24], esp
push str.crc_
call fcn.0041e564
push ecx
lea eax, [esp + 0x10c]
mov ecx, esp
mov dword [esp + 0x24], esp
push eax
mov byte [esp + 0x2118], 0x1a
call fcn.0041e564
lea ecx, [esp + 0x98]
mov byte [esp + 0x2114], bl
push ecx
call fcn.00406590
add esp, 0x10
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x210c], 0x1b
call fcn.0041e5e3
lea ecx, [esp + 0x8c]
mov byte [esp + 0x2108], bl
call fcn.0041e4f6
mov edx, dword [esp + 0x10]
mov ecx, esi
mov edi, edx
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
je 0x406d06
push 0x10
push eax
push edx
call fcn.004093e4
add esp, 0xc
mov dword [esp + 0x58], eax
push 0x22
push ecx
mov ecx, esp
mov dword [esp + 0x24], esp
push str.size_
call fcn.0041e564
push ecx
lea edx, [esp + 0x10c]
mov ecx, esp
mov dword [esp + 0x24], esp
push edx
mov byte [esp + 0x2118], 0x1c
call fcn.0041e564
lea eax, [esp + 0x2c]
mov byte [esp + 0x2114], bl
push eax
call fcn.00406590
add esp, 0x10
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x210c], 0x1d
call fcn.0041e5e3
lea ecx, [esp + 0x20]
mov byte [esp + 0x2108], bl
call fcn.0041e4f6
mov edx, dword [esp + 0x10]
mov ecx, esi
mov edi, edx
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
je 0x406d89
push edx
call fcn.00409648
add esp, 4
mov dword [esp + 0x50], eax
push 0x22
push ecx
mov ecx, esp
mov dword [esp + 0x24], esp
push str.sha1_
call fcn.0041e564
push ecx
lea edx, [esp + 0x10c]
mov ecx, esp
mov dword [esp + 0x24], esp
push edx
mov byte [esp + 0x2118], 0x1e
call fcn.0041e564
lea eax, [esp + 0x34]
mov byte [esp + 0x2114], bl
push eax
call fcn.00406590
add esp, 0x10
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x210c], 0x1f
call fcn.0041e5e3
lea ecx, [esp + 0x28]
mov byte [esp + 0x2108], bl
call fcn.0041e4f6
mov edi, dword [esp + 0x10]
mov ecx, esi
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
je 0x406e0b
lea ecx, [esp + 0x10]
push ecx
lea ecx, [esp + 0x64]
call fcn.0041e5e3
lea ecx, [esp + 0x10]
mov byte [esp + 0x2108], 0xb
call fcn.0041e4f6
cmp dword [esp + 0x4c], esi
je 0x406e53
mov eax, dword [ebp + 0x78]
lea ecx, [ebp + 0x70]
lea edx, [esp + 0x4c]
mov dword [esp + 0x54], 0
push edx
push 1
push eax
call fcn.00407de0
mov ecx, dword [esp + 0x40]
mov eax, dword [esp + 0x48]
inc ecx
inc eax
mov dword [esp + 0x4c], esi
mov dword [esp + 0x40], ecx
mov dword [esp + 0x48], eax
lea eax, [esp + 0x100]
push str.__machine_
push eax
call fcn.004094c0
xor edi, edi
add esp, 8
cmp eax, edi
je 0x406f3e
cmp dword [esp + 0x48], edi
jbe 0x406e93
mov eax, dword [ebp + 0x64]
lea ecx, [ebp + 0x5c]
lea edx, [esp + 0x64]
mov dword [esp + 0x6c], edi
push edx
push 1
push eax
call fcn.00407a90
inc dword [esp + 0x38]
push 0x42f460
lea ecx, [esp + 0x28]
call fcn.0041e633
push 0x42f460
lea ecx, [esp + 0x48]
call fcn.0041e633
push 0x42f460
lea ecx, [esp + 0x18]
call fcn.0041e633
push 0x42f460
lea ecx, [esp + 0x48]
call fcn.0041e633
push 0x42f460
lea ecx, [esp + 0x40]
call fcn.0041e633
push 0x42f460
lea ecx, [esp + 0x38]
call fcn.0041e633
push 0x42f460
lea ecx, [esp + 0xb8]
call fcn.0041e633
push 0x42f460
lea ecx, [esp + 0xb4]
call fcn.0041e633
push 0x42f460
lea ecx, [esp + 0xbc]
call fcn.0041e633
push 0x42f460
lea ecx, [esp + 0xb0]
call fcn.0041e633
mov dword [esp + 0x98], edi
mov dword [esp + 0x4c], esi
mov dword [esp + 0x64], esi
mov dword [esp + 0x48], edi
mov eax, dword [esp + 0x88]
lea ecx, [esp + 0x100]
push eax
push 0x2000
push ecx
call fcn.00409698
mov edi, dword [esp + 0x94]
add esp, 0xc
test eax, eax
jne 0x4067fb
xor ebx, ebx
lea ecx, [esp + 0x60]
mov byte [esp + 0x2108], 0x20
call fcn.0041e4f6
lea ecx, [esp + 0x5c]
mov byte [esp + 0x2108], 0xa
call fcn.0041e4f6
lea ecx, [esp + 0x84]
mov byte [esp + 0x2108], 0x25
call fcn.0041e4f6
lea ecx, [esp + 0x80]
mov byte [esp + 0x2108], 0x24
call fcn.0041e4f6
lea ecx, [esp + 0x7c]
mov byte [esp + 0x2108], 0x23
call fcn.0041e4f6
lea ecx, [esp + 0x78]
mov byte [esp + 0x2108], 0x22
call fcn.0041e4f6
lea ecx, [esp + 0x74]
mov byte [esp + 0x2108], 0x21
call fcn.0041e4f6
lea ecx, [esp + 0x70]
mov byte [esp + 0x2108], 9
call fcn.0041e4f6
lea ecx, [esp + 0xac]
mov byte [esp + 0x2108], 8
call fcn.0041e4f6
lea ecx, [esp + 0xb8]
mov byte [esp + 0x2108], 7
call fcn.0041e4f6
lea ecx, [esp + 0xb0]
mov byte [esp + 0x2108], 6
call fcn.0041e4f6
lea ecx, [esp + 0xb4]
mov byte [esp + 0x2108], 5
call fcn.0041e4f6
lea ecx, [esp + 0x34]
mov byte [esp + 0x2108], 4
call fcn.0041e4f6
lea ecx, [esp + 0x3c]
mov byte [esp + 0x2108], 3
call fcn.0041e4f6
lea ecx, [esp + 0x44]
mov byte [esp + 0x2108], 2
call fcn.0041e4f6
lea ecx, [esp + 0x14]
mov byte [esp + 0x2108], 1
call fcn.0041e4f6
lea ecx, [esp + 0x24]
mov byte [esp + 0x2108], 0
call fcn.0041e4f6
push edi
call fcn.00409540
add esp, 4
jmp 0x4070cd
push ebx
push str.Error
push str.MAME_Header_not_reconized_nMAME_Database_not_loaded
mov ecx, ebp
call fcn.0041caea
push edi
or esi, 0xffffffff
call fcn.00409540
add esp, 4
jmp 0x4070cd
or esi, 0xffffffff
lea edx, [ebp + 0xa4]
lea ecx, [esp + 0x30]
push edx
call fcn.0041e26b
mov eax, dword [esp + 0x30]
push ebx
push ebx
push eax
lea ecx, [esp + 0xfc]
mov byte [esp + 0x2114], 0x26
call fcn.0041f3c2
test eax, eax
je 0x40783f
lea ecx, [esp + 0xf0]
call fcn.0041f6bc
mov edi, eax
mov eax, 0x24924925
mul edi
mov esi, edi
sub esi, edx
shr esi, 1
add esi, edx
shr esi, 4
mov dword [esp + 0x2c], esi
lea ecx, [esi*8]
sub ecx, esi
shl ecx, 2
push ecx
call fcn.0041e94a
add esp, 4
mov ebx, eax
lea ecx, [esp + 0xf0]
mov dword [esp + 0x8c], ebx
push edi
push ebx
call fcn.0041f4df
cmp eax, edi
je 0x407189
push 0x10
push str.Error
push str.Failed_reading_ROMIDENT.ROM_
mov ecx, ebp
call fcn.0041caea
lea ecx, [esp + 0xf0]
call fcn.0041f5dd
push ebx
call fcn.0041e973
add esp, 4
mov dword [esp + 0x2c], 0
jmp 0x40783a
lea ecx, [esp + 0xf0]
call fcn.0041f5dd
lea ecx, [esp + 0xc4]
mov dword [ebp + 0x84], 1
call fcn.0041f2b0
mov edi, dword [esp + 0x30]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x20]
repne scasb al, byte es:[edi]
not ecx
add ecx, 0xfffffffc
mov byte [esp + 0x2108], 0x27
push ecx
push edx
lea ecx, [esp + 0x38]
call fcn.00419e2d
push 0x42d944
push eax
lea eax, [esp + 0x30]
mov byte [esp + 0x2110], 0x28
push eax
call fcn.0041e6fe
push eax
lea ecx, [esp + 0x34]
mov byte [esp + 0x210c], 0x29
call fcn.0041e5e3
lea ecx, [esp + 0x28]
mov byte [esp + 0x2108], 0x28
call fcn.0041e4f6
lea ecx, [esp + 0x20]
mov byte [esp + 0x2108], 0x27
call fcn.0041e4f6
mov ecx, dword [esp + 0x30]
xor edi, edi
push edi
push edi
push ecx
lea ecx, [esp + 0xd0]
call fcn.0041f3c2
test eax, eax
jne 0x407262
push 0x10
push str.Error
push str.Cannot_Open_ROMIDENT.GAM_nDownload_ROMIdent__and_copy_the_file_to_this_folder_
mov ecx, ebp
call fcn.0041caea
push ebx
call fcn.0041e973
add esp, 4
mov dword [ebp + 0x84], edi
mov dword [esp + 0x2c], edi
jmp 0x407826
lea ecx, [esp + 0xc4]
call fcn.0041f6bc
mov ecx, eax
mov eax, 0xcccccccd
mul ecx
shr edx, 6
mov dword [esp + 0x14], ecx
lea edx, [edx + edx*4]
shl edx, 4
push edx
call fcn.0041e94a
add esp, 4
mov edi, eax
mov eax, dword [esp + 0x14]
lea ecx, [esp + 0xc4]
push eax
push edi
mov dword [esp + 0x3c], edi
call fcn.0041f4df
cmp eax, dword [esp + 0x14]
je 0x4072e9
push 0x10
push str.Error
push str.Failed_reading_ROMIDENT.GAM_
mov ecx, ebp
call fcn.0041caea
lea ecx, [esp + 0xc4]
call fcn.0041f5dd
push edi
call fcn.0041e973
push ebx
call fcn.0041e973
add esp, 8
xor eax, eax
mov dword [ebp + 0x84], eax
mov dword [esp + 0x2c], eax
mov esi, eax
jmp 0x4072ff
lea ecx, [esp + 0xc4]
call fcn.0041f5dd
mov dword [ebp + 0x8c], 1
test esi, esi
jbe 0x40780c
add ebx, 0x18
mov dword [esp + 0x3c], esi
mov dword [esp + 0x10], ebx
jmp 0x407318
mov edi, dword [esp + 0x34]
mov eax, dword [0x42db7c]
mov dword [esp + 0x5c], eax
mov dword [esp + 0x60], eax
mov ecx, dword [ebx - 4]
mov edx, dword [ebx]
lea eax, [ebx - 0x16]
mov dword [esp + 0x58], ecx
push eax
lea ecx, [esp + 0x60]
mov byte [esp + 0x210c], 0x2a
mov dword [esp + 0x54], edx
call fcn.0041e633
movsx ecx, word [ebx - 0x18]
mov eax, dword [ebp + 0x60]
mov esi, dword [esp + 0x40]
mov dword [ebp + 0x6c], eax
mov edx, dword [ebp + 0x64]
add ecx, esi
cmp eax, edx
mov dword [esp + 0x4c], ecx
je 0x40737a
mov eax, dword [ebp + 0x6c]
cmp dword [eax], ecx
je 0x4075ee
add eax, 0x24
mov dword [ebp + 0x6c], eax
mov edx, dword [ebp + 0x64]
cmp eax, edx
jne 0x407362
mov eax, dword [0x42db7c]
mov dword [esp + 0x70], eax
mov dword [esp + 0x74], eax
mov dword [esp + 0x78], eax
mov dword [esp + 0x7c], eax
mov dword [esp + 0x80], eax
mov dword [esp + 0x84], eax
movsx eax, word [ebx - 0x18]
mov dword [esp + 0x64], ecx
mov byte [esp + 0x2108], 0x2b
lea ecx, [eax + eax*4]
shl ecx, 4
add ecx, edi
push ecx
lea ecx, [esp + 0x78]
call fcn.0041e633
mov ecx, dword [ebp + 0x64]
mov edx, dword [ebp + 0x68]
lea esi, [ebp + 0x5c]
sub edx, ecx
mov eax, 0x38e38e39
mov dword [esp + 0x6c], 1
imul edx
sar edx, 3
mov eax, edx
mov edi, ecx
shr eax, 0x1f
add edx, eax
cmp edx, 1
jae 0x4074d0
mov ebx, dword [esi + 4]
test ebx, ebx
je 0x407413
mov edx, ecx
mov eax, 0x38e38e39
sub edx, ebx
imul edx
sar edx, 3
mov eax, edx
shr eax, 0x1f
add edx, eax
cmp edx, 1
mov dword [esp + 0x14], edx
ja 0x40741b
mov dword [esp + 0x14], 1
test ebx, ebx
jne 0x407423
xor edx, edx
jmp 0x407436
sub ecx, ebx
mov eax, 0x38e38e39
imul ecx
sar edx, 3
mov ecx, edx
shr ecx, 0x1f
add edx, ecx
mov eax, dword [esp + 0x14]
add eax, edx
test eax, eax
mov dword [esp + 0x20], eax
jge 0x407446
xor eax, eax
lea ecx, [eax + eax*8]
shl ecx, 2
push ecx
call fcn.0041e94a
mov edx, dword [esi + 4]
add esp, 4
mov ebx, eax
mov ecx, esi
push ebx
push edi
push edx
call fcn.00408160
lea ecx, [esp + 0x64]
mov dword [esp + 0x28], eax
push ecx
push 1
push eax
mov ecx, esi
call fcn.004081a0
mov edx, dword [esp + 0x28]
mov eax, dword [esi + 8]
add edx, 0x24
mov ecx, esi
push edx
push eax
push edi
call fcn.00408160
mov ecx, dword [esi + 8]
mov edx, dword [esi + 4]
push ecx
push edx
mov ecx, esi
call fcn.00407a00
mov eax, dword [esi + 4]
push eax
call fcn.0041e973
mov eax, dword [esp + 0x24]
add esp, 4
lea eax, [eax + eax*8]
lea ecx, [ebx + eax*4]
mov dword [esi + 0xc], ecx
mov ecx, esi
call fcn.004079d0
inc eax
mov dword [esi + 4], ebx
lea edx, [eax + eax*8]
lea eax, [ebx + edx*4]
mov ebx, dword [esp + 0x10]
mov dword [esi + 8], eax
jmp 0x40757b
mov edx, ecx
mov eax, 0x38e38e39
sub edx, edi
imul edx
sar edx, 3
mov eax, edx
shr eax, 0x1f
add edx, eax
cmp edx, 1
jae 0x407545
lea edx, [edi + 0x24]
push edx
push ecx
push edi
mov ecx, esi
call fcn.00408160
mov ebx, dword [esi + 8]
lea eax, [esp + 0x64]
mov ecx, ebx
push eax
sub ecx, edi
mov eax, 0x38e38e39
imul ecx
sar edx, 3
mov ecx, edx
mov eax, 1
shr ecx, 0x1f
add edx, ecx
mov ecx, esi
sub eax, edx
push eax
push ebx
call fcn.004081a0
mov edx, dword [esi + 8]
lea ecx, [esp + 0x64]
push ecx
push edx
push edi
call fcn.00408240
mov eax, dword [esi + 8]
mov ebx, dword [esp + 0x1c]
add esp, 0xc
add eax, 0x24
mov dword [esi + 8], eax
jmp 0x40757b
push ecx
push ecx
add ecx, 0xffffffdc
push ecx
mov ecx, esi
call fcn.00408160
mov eax, dword [esi + 8]
push eax
add eax, 0xffffffdc
push eax
push edi
call fcn.004082c0
lea eax, [esp + 0x70]
lea ecx, [edi + 0x24]
push eax
push ecx
push edi
call fcn.00408240
mov eax, dword [esi + 8]
add esp, 0x18
add eax, 0x24
mov dword [esi + 8], eax
inc dword [esp + 0xa4]
lea ecx, [esp + 0x84]
mov byte [esp + 0x2108], 0x30
call fcn.0041e4f6
lea ecx, [esp + 0x80]
mov byte [esp + 0x2108], 0x2f
call fcn.0041e4f6
lea ecx, [esp + 0x7c]
mov byte [esp + 0x2108], 0x2e
call fcn.0041e4f6
lea ecx, [esp + 0x78]
mov byte [esp + 0x2108], 0x2d
call fcn.0041e4f6
lea ecx, [esp + 0x74]
mov byte [esp + 0x2108], 0x2c
call fcn.0041e4f6
lea ecx, [esp + 0x70]
mov byte [esp + 0x2108], 0x2a
call fcn.0041e4f6
mov ecx, dword [ebp + 0x78]
mov edx, dword [ebp + 0x7c]
lea esi, [ebp + 0x70]
sub edx, ecx
mov eax, 0x2aaaaaab
mov dword [esp + 0x54], 1
imul edx
sar edx, 2
mov eax, edx
mov edi, ecx
shr eax, 0x1f
add edx, eax
cmp edx, 1
jae 0x40771e
mov ebx, dword [esi + 4]
test ebx, ebx
je 0x407642
mov edx, ecx
mov eax, 0x2aaaaaab
sub edx, ebx
imul edx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add edx, eax
cmp edx, 1
mov dword [esp + 0x14], edx
ja 0x40764a
mov dword [esp + 0x14], 1
test ebx, ebx
jne 0x407652
xor edx, edx
jmp 0x407665
sub ecx, ebx
mov eax, 0x2aaaaaab
imul ecx
sar edx, 2
mov ecx, edx
shr ecx, 0x1f
add edx, ecx
mov eax, dword [esp + 0x14]
add eax, edx
test eax, eax
mov dword [esp + 0x28], eax
jge 0x407675
xor eax, eax
lea ecx, [eax + eax*2]
shl ecx, 3
push ecx
call fcn.0041e94a
mov dword [esp + 0x24], eax
mov ebx, eax
mov eax, dword [esi + 4]
add esp, 4
cmp eax, edi
mov dword [esp + 0x24], eax
je 0x4076b7
jmp 0x40769b
mov eax, dword [esp + 0x24]
push eax
push ebx
call fcn.004084d0
mov eax, dword [esp + 0x2c]
add esp, 8
add eax, 0x18
add ebx, 0x18
cmp eax, edi
mov dword [esp + 0x24], eax
jne 0x407697
lea edx, [esp + 0x4c]
push edx
push ebx
call fcn.004084d0
mov eax, dword [esi + 8]
add esp, 8
add ebx, 0x18
mov ecx, esi
push ebx
push eax
push edi
call fcn.004081d0
mov ecx, dword [esi + 8]
mov edx, dword [esi + 4]
push ecx
push edx
mov ecx, esi
call fcn.00407a60
mov eax, dword [esi + 4]
push eax
call fcn.0041e973
mov eax, dword [esp + 0x2c]
mov edi, dword [esp + 0x24]
add esp, 4
lea eax, [eax + eax*2]
lea ecx, [edi + eax*8]
mov dword [esi + 0xc], ecx
mov ecx, esi
call fcn.00407a30
inc eax
mov ebx, dword [esp + 0x10]
mov dword [esi + 4], edi
lea edx, [eax + eax*2]
lea eax, [edi + edx*8]
mov dword [esi + 8], eax
jmp 0x4077c9
mov edx, ecx
mov eax, 0x2aaaaaab
sub edx, edi
imul edx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add edx, eax
cmp edx, 1
jae 0x407793
lea edx, [edi + 0x18]
push edx
push ecx
push edi
mov ecx, esi
call fcn.004081d0
mov ebx, dword [esi + 8]
lea eax, [esp + 0x4c]
mov ecx, ebx
push eax
sub ecx, edi
mov eax, 0x2aaaaaab
imul ecx
sar edx, 2
mov ecx, edx
mov eax, 1
shr ecx, 0x1f
add edx, ecx
mov ecx, esi
sub eax, edx
push eax
push ebx
call fcn.00408210
mov edx, dword [esi + 8]
lea ecx, [esp + 0x4c]
push ecx
push edx
push edi
call fcn.00408350
mov eax, dword [esi + 8]
mov ebx, dword [esp + 0x1c]
add esp, 0xc
add eax, 0x18
mov dword [esi + 8], eax
jmp 0x4077c9
push ecx
push ecx
add ecx, 0xffffffe8
push ecx
mov ecx, esi
call fcn.004081d0
mov eax, dword [esi + 8]
push eax
add eax, 0xffffffe8
push eax
push edi
call fcn.004083b0
lea eax, [esp + 0x58]
lea ecx, [edi + 0x18]
push eax
push ecx
push edi
call fcn.00408350
mov eax, dword [esi + 8]
add esp, 0x18
add eax, 0x18
mov dword [esi + 8], eax
lea ecx, [esp + 0x60]
mov byte [esp + 0x2108], 0x31
call fcn.0041e4f6
lea ecx, [esp + 0x5c]
mov byte [esp + 0x2108], 0x27
call fcn.0041e4f6
mov eax, dword [esp + 0x3c]
add ebx, 0x1c
dec eax
mov dword [esp + 0x10], ebx
mov dword [esp + 0x3c], eax
jne 0x407314
mov ebx, dword [esp + 0x8c]
mov edi, dword [esp + 0x34]
test ebx, ebx
je 0x407819
push ebx
call fcn.0041e973
add esp, 4
test edi, edi
je 0x407826
push edi
call fcn.0041e973
add esp, 4
lea ecx, [esp + 0xc4]
mov byte [esp + 0x2108], 0x26
call fcn.0041f305
or esi, 0xffffffff
xor ebx, ebx
mov edx, dword [esp + 0x40]
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x38]
add edx, eax
mov dword [ebp + 0x94], edx
mov edx, dword [esp + 0xa4]
add ecx, edx
push ebx
mov dword [ebp + 0x98], ecx
mov eax, dword [ebp + 0x110]
push ebx
push 0x402
push eax
call dword [sym.imp.USER32.dll_SendMessageA]
mov ecx, dword [0x42db7c]
mov dword [esp + 0x90], ecx
mov edx, dword [ebp + 0x94]
mov eax, dword [ebp + 0x98]
push edx
push eax
lea ecx, [esp + 0x98]
mov bl, 0x32
push str.Games:__d_nROMs:__d
push ecx
mov byte [esp + 0x2118], bl
call fcn.0041a1cf
add esp, 0x10
lea edx, [esp + 0x90]
lea ecx, [ebp + 0x1fc]
push edx
call fcn.0041e5e3
push 0
mov ecx, ebp
call fcn.0041d246
mov ecx, ebp
call fcn.004063b0
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, dword [0x42db7c]
mov dword [esp + 0x9c], ecx
mov ecx, dword [esp + 0xe0]
mov dword [esp + 0xc0], 0
sub eax, ecx
mov edx, dword [ebp + 0x98]
mov dword [esp + 0xbc], eax
mov eax, dword [ebp + 0x94]
fild qword [esp + 0xbc]
sub esp, 8
lea ecx, [esp + 0xa4]
mov byte [esp + 0x2110], 0x33
fmul dword [0x425c20]
fstp qword [esp]
push edx
push eax
push str.Loaded__d_ROMS_and__d_Games_in__0.2f_seconds_r_n
push ecx
call fcn.0041a1cf
add esp, 0x18
mov ecx, ebp
push 1
call fcn.0041d246
lea edx, [esp + 0x9c]
lea ecx, [ebp + 0x1e8]
push edx
call fcn.0041e881
push 0
mov ecx, ebp
call fcn.0041d246
lea ecx, [esp + 0x9c]
mov byte [esp + 0x2108], bl
call fcn.0041e4f6
lea ecx, [esp + 0x90]
mov byte [esp + 0x2108], 0x26
call fcn.0041e4f6
lea ecx, [esp + 0x30]
mov byte [esp + 0x2108], 0
call fcn.0041e4f6
lea ecx, [esp + 0xf0]
mov dword [esp + 0x2108], esi
call fcn.0041f305
mov ecx, dword [esp + 0x2100]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
pop ebx
add esp, 0x20fc
ret