Function at 0x40e4b0
Capabilities:
Copy file
Query or enumerate registry value
Set file attributes

Disassembly:
push ebp
mov ebp, esp
push edi
xor edi, edi
push esi
push ebx
sub esp, 0x87c
mov dword [ebp - 0x81c], eax
call fcn.00428bf0
mov dword [esp], 0
mov ebx, eax
call sub.msvcrt.dll_time
mov dword [esp], eax
call sub.msvcrt.dll_srand
call dword [sym.imp.mameplib.dll_init_resource_tracking]
call dword [sym.imp.mameplib.dll_begin_resource_tracking]
mov dword [0x46a070], edi
mov edx, dword [sym.imp.mameplib.dll_drivers]
mov esi, dword [edx]
test esi, esi
je 0x40e50d
xor eax, eax
nop
inc eax
mov ecx, dword [edx + eax*4]
test ecx, ecx
jne 0x40e500
mov dword [0x46a070], eax
mov eax, dword [0x46a070]
shl eax, 2
mov dword [esp], eax
call sub.msvcrt.dll_malloc
mov dword [0x46a0e0], eax
xor edx, edx
test eax, eax
je 0x40e820
mov edx, dword [0x46a070]
mov edi, eax
lea ecx, [edx*4]
cmp ecx, 7
jbe 0x40e550
test al, 4
je 0x40e550
mov dword [eax], 0
add edi, 4
sub ecx, 4
cld
xor eax, eax
shr ecx, 2
rep stosd dword es:[edi], eax
lea esi, [edx*8]
mov dword [esp], esi
call sub.msvcrt.dll_malloc
mov dword [0x46e140], eax
xor edx, edx
test eax, eax
mov ecx, eax
je 0x40e820
mov eax, dword [0x46a070]
cmp edx, eax
jl 0x40e589
jmp 0x40e5b2
mov ecx, dword [0x46e140]
mov edi, dword [sym.imp.mameplib.dll_drivers]
mov eax, dword [edi + edx*4]
mov esi, dword [eax + 8]
mov dword [ecx + edx*8], esi
mov edi, dword [0x46e140]
mov dword [edi + edx*8 + 4], edx
mov eax, dword [0x46a070]
inc edx
cmp edx, eax
jl 0x40e583
mov ecx, dword [0x46e140]
mov dword [esp], ecx
mov edi, 0x402330
mov esi, 8
mov dword [esp + 4], eax
mov dword [esp + 0xc], edi
lea edi, [ebp - 0x48]
mov dword [esp + 8], esi
mov esi, ebx
sar esi, 0x10
call sub.msvcrt.dll_qsort
call dword [sym.imp.mameplib.dll_cpuintrf_init]
call dword [sym.imp.mameplib.dll_sndintrf_init]
mov dword [ebp - 0x48], 3
mov ecx, dword [ebp - 0x81c]
mov edx, 0x6b
mov dword [esp + 4], edx
mov dword [ebp - 0x44], 0x40cb70
mov dword [ebp - 0x38], ecx
mov dword [esp], ecx
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x3c], 0x1e
call fcn.0044e135
mov dword [ebp - 0x34], eax
sub esp, 8
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x2c], 0x10
mov dword [ebp - 0x28], 0x6e
mov dword [ebp - 0x24], 0x460968
mov dword [esp], edi
call fcn.0044e105
sub esp, 4
call sub.COMCTL32.DLL_InitCommonControls
mov dword [esp + 4], esi
movzx eax, bx
mov dword [esp + 8], eax
mov dword [esp], str.common_control_version__i._i
call fcn.00428ae0
xor edx, edx
cmp ebx, 0x40046
setle dl
mov dword [0x46a130], edx
xor ecx, ecx
cmp ebx, 0x5ffff
setg cl
test edx, edx
mov dword [0x46a120], ecx
je 0x40e6d9
mov edx, str.MAME32_has_detected_an_old_version_of_comctl32.dll_n_nGame_Properties__many_configuration_options_and_nfeatures_are_not_available_without_an_updated_DLL_n_nPlease_install_the_common_control_update_found_at:_n_nhttp:__www.microsoft.com_msdownload_ieplatform_ie_comctrlx86.asp_n_nWould_you_like_to_continue_without_using_the_new_features__n
lea ebx, [ebp - 0x1a8]
mov esi, 0x149
mov dword [esp + 4], edx
mov dword [esp + 8], esi
mov dword [esp], ebx
call sub.msvcrt.dll_memcpy
mov dword [esp + 4], ebx
mov ecx, 0x34
mov eax, str.MAME32_Outdated_comctl32.dll_Warning
mov dword [esp + 0xc], ecx
mov dword [esp + 8], eax
mov dword [esp], 0
call sub.USER32.dll_MessageBoxA
sub esp, 0x10
xor edx, edx
cmp eax, 7
je 0x40e820
mov dword [esp], str.about_to_init_options
call fcn.00428ae0
call fcn.0041eaa0
mov dword [esp], str.options_loaded
call fcn.00428ae0
call fcn.004131e0
test eax, eax
jne 0x40f616
mov eax, dword [0x46e170]
test eax, eax
jne 0x40f609
mov edx, dword [0x46a070]
shl edx, 2
mov dword [esp], edx
call sub.msvcrt.dll_malloc
mov dword [0x46e170], eax
test eax, eax
je 0x40e79c
xor esi, esi
cmp esi, dword [0x46a070]
jge 0x40e79c
lea esi, [esi]
lea edi, [edi]
mov eax, dword [sym.imp.mameplib.dll_drivers]
mov edx, dword [eax + esi*4]
mov ebx, dword [edx + 0x10]
mov dword [esp], 1
mov dword [esp + 4], ebx
call dword [sym.imp.mameplib.dll_lang_message]
mov ecx, dword [sym.imp.mameplib.dll_drivers]
mov edi, dword [ecx + esi*4]
mov ebx, eax
mov eax, dword [edi + 0x10]
mov dword [esp], 2
mov dword [esp + 4], eax
call dword [sym.imp.mameplib.dll_lang_message]
mov edx, dword [sym.imp.mameplib.dll_drivers]
mov edi, dword [0x46e170]
mov ecx, dword [edx + esi*4]
cmp dword [ecx + 0x10], eax
cmovne ebx, eax
mov dword [edi + esi*4], ebx
inc esi
cmp esi, dword [0x46a070]
jl 0x40e740
mov dword [esp], 0x460478
call fcn.0044e0d5
xor ebx, ebx
sub esp, 4
mov dword [0x46a200], eax
mov edi, 0x65
call fcn.00412b20
mov dword [0x46a1f0], eax
call fcn.00435400
call fcn.00414200
mov dword [esp + 4], eax
mov dword [esp], 0x46e020
call sub.msvcrt.dll_strcpy
mov dword [esp + 0xc], ebx
mov esi, dword [ebp - 0x81c]
xor edx, edx
mov dword [esp + 0x10], edx
xor ecx, ecx
mov dword [esp + 8], ecx
mov dword [esp + 4], edi
mov dword [esp], esi
call fcn.0044e0a5
mov dword [0x46a010], eax
sub esp, 0x14
test eax, eax
jne 0x40e82a
mov dword [esp], str.error_creating_main_dialog__aborting
call fcn.00428ae0
xor edx, edx
mov esi, esi
lea edi, [edi]
lea esp, [ebp - 0xc]
mov eax, edx
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [sym.imp.mameplib.dll_build_version]
mov edx, 0x4602d6
lea ebx, [ebp - 0x1a8]
mov dword [esp + 4], edx
lea esi, [ebp - 0x168]
mov edi, str._s_Plus___s
mov dword [esp + 8], ebx
mov dword [esp], eax
call sub.msvcrt.dll_sscanf
mov dword [esp + 0xc], ebx
mov ecx, 0x4602d9
mov ebx, 0x48f
mov dword [esp + 8], ecx
mov dword [esp + 4], edi
mov edi, 8
mov dword [esp], esi
call sub.msvcrt.dll_sprintf
mov dword [esp], esi
lea esi, [ebp - 0x800]
call fcn.00429af0
mov dword [esp + 4], eax
mov edx, dword [0x46a010]
mov dword [esp], edx
call fcn.0044e165
mov eax, dword [0x46a010]
sub esp, 8
mov dword [esp + 4], ebx
mov dword [esp], eax
call sub.USER32.dll_GetDlgItem
mov dword [0x46a160], eax
sub esp, 8
mov ecx, 0x45d3e0
mov dword [ebp - 0x800], ecx
mov dword [ebp - 0x7fc], edi
mov dword [esp + 4], esi
mov dword [esp], eax
call fcn.00447050
xor edx, edx
test eax, eax
je 0x40e820
mov ecx, dword [0x46a010]
mov edi, 0x460
mov ebx, 0xfffffffc
mov dword [esp + 4], edi
mov esi, 0x405f60
mov edi, 0xfffffffc
mov dword [esp], ecx
call sub.USER32.dll_GetDlgItem
sub esp, 8
mov dword [esp + 4], ebx
mov dword [esp], eax
call fcn.0044e225
mov dword [0x46a1e0], eax
mov eax, dword [0x46a010]
mov edx, 0x460
sub esp, 8
mov dword [esp + 4], edx
mov dword [esp], eax
call sub.USER32.dll_GetDlgItem
sub esp, 8
mov dword [esp + 8], esi
mov esi, 0x41e
mov dword [esp + 4], edi
mov edi, 0x4060a0
mov dword [esp], eax
call fcn.0044e1f5
mov ebx, dword [0x46a010]
mov ecx, 0x41e
sub esp, 0xc
mov dword [esp + 4], ecx
mov dword [esp], ebx
mov ebx, 0x421
call sub.USER32.dll_GetDlgItem
sub esp, 8
mov edx, 0xfffffffc
mov dword [esp + 4], edx
mov dword [esp], eax
call fcn.0044e225
mov dword [0x46a1d0], eax
mov eax, dword [0x46a010]
sub esp, 8
mov dword [esp + 4], esi
mov esi, 0xfffffffc
mov dword [esp], eax
call sub.USER32.dll_GetDlgItem
sub esp, 8
mov ecx, 0xfffffffc
mov dword [esp + 4], ecx
mov dword [esp + 8], edi
mov edi, 0x421
mov dword [esp], eax
call fcn.0044e1f5
mov edx, dword [0x46a010]
sub esp, 0xc
mov dword [esp + 4], ebx
mov ebx, 0xfffffffc
mov dword [esp], edx
call sub.USER32.dll_GetDlgItem
sub esp, 8
mov dword [esp + 4], esi
mov dword [esp], eax
call fcn.0044e225
mov dword [0x46a1c0], eax
mov eax, dword [0x46a010]
sub esp, 8
mov dword [esp + 4], edi
mov edi, 0x14
mov dword [esp], eax
call sub.USER32.dll_GetDlgItem
sub esp, 8
mov ecx, 0x4064a0
mov dword [esp + 8], ecx
mov dword [esp + 4], ebx
xor ebx, ebx
mov dword [esp], eax
call fcn.0044e1f5
sub esp, 0xc
mov dword [esp], 0
call sub.KERNEL32.dll_GetModuleHandleA
sub esp, 4
mov edx, 0x71
mov dword [esp + 4], edx
mov dword [esp], eax
call fcn.0044e075
mov dword [0x46de50], eax
mov esi, dword [ebp - 0x81c]
sub esp, 8
mov dword [0x46a020], esi
mov esi, dword [0x46a010]
call fcn.00412730
mov dword [esp + 0x30], edi
mov edx, 0x10
xor ecx, ecx
mov dword [esp + 0x24], edx
mov edx, dword [0x46a020]
mov edi, 0x10
mov dword [esp + 0x2c], ecx
mov ecx, 0xd
add eax, 0xc1
mov dword [esp + 0x28], ebx
mov ebx, 0x45d000
mov dword [esp + 0x20], edi
mov edi, 8
mov dword [esp + 0x1c], ecx
mov ecx, 1
mov dword [esp + 0x18], ebx
mov ebx, 0x54000901
mov dword [esp + 0x10], edx
mov dword [esp + 8], ecx
mov dword [esp + 0xc], edi
mov dword [esp + 4], ebx
mov dword [esp], esi
mov dword [esp + 0x14], eax
call sub.COMCTL32.DLL_CreateToolbarEx
mov dword [ebp - 0x824], eax
sub esp, 0x34
mov eax, 0x46062a
mov dword [esp + 4], eax
mov dword [esp], 5
call dword [sym.imp.mameplib.dll_lang_message]
mov dword [esp], eax
call fcn.00429af0
mov dword [esp], 0x460639
mov ebx, eax
call fcn.00429af0
mov dword [esp + 0x20], esi
mov edi, dword [0x46a020]
xor edx, edx
mov dword [esp + 0x2c], edx
mov ecx, 0x63
mov edx, 0x14
mov dword [esp + 0x24], ecx
mov esi, 1
mov ecx, 0x104
mov dword [esp + 0x28], edi
mov edi, 0xc8
mov dword [esp + 0x1c], edx
mov edx, 0x50800000
mov dword [esp + 0x10], ecx
mov dword [esp + 0xc], edx
mov dword [esp + 0x18], edi
mov edi, str.Ready
mov dword [esp + 0x14], esi
mov esi, 2
mov dword [esp + 8], ebx
mov dword [esp + 4], eax
mov dword [esp], 0
call fcn.0044de95
mov ebx, dword [ebp - 0x824]
sub esp, 0x30
mov dword [esp], eax
mov dword [esp + 4], ebx
call sub.USER32.dll_SetParent
mov dword [0x46a090], ebx
sub esp, 8
mov ebx, dword [0x46a010]
mov dword [esp + 4], edi
xor edi, edi
mov dword [esp], 5
call dword [sym.imp.mameplib.dll_lang_message]
mov dword [esp], eax
call fcn.00429af0
mov dword [esp + 4], eax
mov dword [esp + 0xc], esi
mov dword [esp + 8], ebx
mov dword [esp], 0x54000903
call sub.COMCTL32.DLL_CreateStatusWindowW
mov dword [0x46a0d0], eax
sub esp, 0x10
mov ebx, eax
mov dword [esp], ebx
xor ecx, ecx
mov edx, 0x40a
mov dword [esp + 8], ecx
lea eax, [ebp - 0xf8]
mov dword [esp + 4], edx
mov dword [esp + 0xc], eax
call fcn.0044e1c5
mov esi, dword [0x46a020]
sub esp, 0x10
xor eax, eax
mov dword [esp + 0x2c], edi
mov edx, dword [ebp - 0xf8]
mov ecx, dword [ebp - 0xec]
mov dword [esp + 0x28], esi
mov esi, dword [ebp - 0xf4]
mov edi, dword [ebp - 0xf0]
mov dword [esp + 0x24], eax
add edx, 0x96
sub ecx, esi
mov dword [esp + 0x20], ebx
sub edi, edx
mov eax, 0x40000001
mov dword [esp + 0x1c], ecx
mov ebx, str.Progress_Bar
mov ecx, str.msctls_progress32
mov dword [esp + 4], ecx
mov dword [ebp - 0xf8], edx
mov dword [esp + 0x18], edi
mov dword [esp + 0x14], esi
mov dword [esp + 0x10], edx
mov dword [esp + 8], ebx
mov ebx, 0x444
mov dword [esp + 0xc], eax
mov dword [esp], 0x20000
call fcn.0044de95
mov dword [0x46a1b0], eax
mov edi, dword [0x46a090]
lea edx, [ebp - 0x58]
mov esi, dword [0x46a0d0]
sub esp, 0x30
mov eax, dword [0x46a010]
mov dword [esp + 4], edx
mov dword [0x45cf04], edi
mov edi, 0x3e8
mov dword [0x45cf18], esi
mov dword [esp], eax
call sub.USER32.dll_GetClientRect
mov ecx, dword [0x46a010]
sub esp, 8
mov dword [esp + 4], ebx
mov dword [esp], ecx
call sub.USER32.dll_GetDlgItem
mov dword [0x46a050], eax
mov esi, dword [0x46a010]
sub esp, 8
mov dword [esp + 4], edi
mov dword [esp], esi
call sub.USER32.dll_GetDlgItem
mov dword [0x46a030], eax
sub esp, 8
call fcn.00410280
xor edx, edx
test eax, eax
je 0x40e820
xor esi, esi
call fcn.00410200
mov dword [ebp - 0x838], esi
cmp dword [ebp - 0x838], eax
mov dword [ebp - 0x820], eax
jge 0x40ed8c
xor edi, edi
mov ecx, dword [edi + 0x460f08]
mov esi, dword [0x46a010]
mov dword [esp + 4], ecx
mov dword [esp], esi
call sub.USER32.dll_GetDlgItem
mov edx, dword [edi + 0x460f0c]
sub esp, 8
mov esi, eax
mov ebx, dword [0x46a010]
mov dword [esp + 4], edx
mov dword [esp], ebx
call sub.USER32.dll_GetDlgItem
mov ebx, eax
mov ecx, dword [0x46a010]
sub esp, 8
mov eax, dword [edi + 0x460f10]
mov dword [esp], ecx
mov dword [esp + 4], eax
call sub.USER32.dll_GetDlgItem
mov edx, dword [edi + 0x460f14]
sub esp, 8
add edi, 0x18
mov dword [esp + 8], eax
mov dword [esp + 0xc], edx
mov dword [esp + 4], ebx
mov dword [esp], esi
call fcn.004108c0
inc dword [ebp - 0x838]
mov eax, dword [ebp - 0x820]
cmp dword [ebp - 0x838], eax
jl 0x40ed02
mov edi, dword [0x46a010]
xor ebx, ebx
mov dword [esp], edi
call fcn.00401a80
mov esi, dword [0x46a160]
mov dword [esp], esi
mov esi, 0x9c6a
call fcn.00446910
call fcn.004129a0
mov dword [0x46a1a0], eax
mov edx, 1
mov dword [0x46d2d0], edx
mov dword [0x46d2e0], ebx
call fcn.00412ba0
mov dword [0x45c044], eax
call fcn.00412c60
mov dword [0x45c03c], eax
call fcn.00412c20
mov dword [0x45c040], eax
call fcn.00412c40
mov dword [0x45c038], eax
call fcn.00413180
mov edi, eax
mov eax, dword [0x46a010]
mov dword [esp], eax
call sub.USER32.dll_GetMenu
sub esp, 4
mov edx, 0x9c5f
mov ecx, 8
mov dword [esp + 4], edx
mov dword [esp + 0x10], ecx
mov dword [esp + 0xc], edi
mov dword [esp + 8], esi
mov dword [esp], eax
call sub.USER32.dll_CheckMenuRadioItem
mov ebx, dword [0x46a010]
sub esp, 0x14
mov dword [esp], ebx
call sub.USER32.dll_GetMenu
sub esp, 4
cmp dword [0x45c044], 1
mov ecx, 0x9c73
mov dword [esp + 4], ecx
mov dword [esp], eax
sbb edi, edi
not edi
and edi, 8
mov dword [esp + 8], edi
call sub.USER32.dll_CheckMenuItem
sub esp, 0xc
cmp dword [0x45c044], 1
mov ebx, dword [0x46a090]
mov edx, 0x9c73
mov dword [esp + 8], edx
mov eax, 0x402
mov dword [esp + 4], eax
sbb esi, esi
not esi
mov dword [esp], ebx
and esi, 8
mov dword [esp + 0xc], esi
mov esi, 0x9c78
call fcn.0044e1c5
mov edi, dword [0x46a010]
sub esp, 0x10
mov dword [esp], edi
call sub.USER32.dll_GetMenu
sub esp, 4
cmp dword [0x45c03c], 1
mov dword [esp + 4], esi
mov dword [esp], eax
sbb ecx, ecx
not ecx
and ecx, 8
mov dword [esp + 8], ecx
call sub.USER32.dll_CheckMenuItem
sub esp, 0xc
cmp dword [0x45c03c], 1
mov eax, dword [0x46a090]
sbb edx, edx
mov dword [esp], eax
not edx
and edx, 5
mov dword [esp + 4], edx
call sub.USER32.dll_ShowWindow
mov ebx, dword [0x46a010]
sub esp, 8
mov dword [esp], ebx
call sub.USER32.dll_GetMenu
sub esp, 4
cmp dword [0x45c040], 1
mov ecx, 0x9c75
mov dword [esp + 4], ecx
mov dword [esp], eax
sbb edi, edi
not edi
and edi, 8
mov dword [esp + 8], edi
mov edi, 0x9c72
call sub.USER32.dll_CheckMenuItem
sub esp, 0xc
cmp dword [0x45c040], 1
mov edx, dword [0x46a0d0]
sbb esi, esi
mov dword [esp], edx
not esi
and esi, 5
mov dword [esp + 4], esi
call sub.USER32.dll_ShowWindow
mov eax, dword [0x46a010]
sub esp, 8
mov dword [esp], eax
call sub.USER32.dll_GetMenu
sub esp, 4
cmp dword [0x45c038], 1
mov dword [esp + 4], edi
mov dword [esp], eax
sbb ebx, ebx
not ebx
and ebx, 8
mov dword [esp + 8], ebx
call sub.USER32.dll_CheckMenuItem
sub esp, 0xc
call fcn.00412870
mov ebx, eax
call fcn.00412730
test eax, eax
jne 0x40f7e7
dec ebx
je 0x40f7ee
mov eax, 8
mov dword [esp + 0xc], eax
mov edx, dword [0x46a090]
mov edi, 0x545
mov dword [esp + 8], edi
mov esi, 0x402
mov ebx, 1
mov dword [esp + 4], esi
mov dword [esp], edx
call fcn.0044e1c5
mov eax, dword [0x46a010]
sub esp, 0x10
mov dword [esp + 4], ebx
mov dword [esp], eax
call sub.SHELL32.DLL_DragAcceptFiles
mov ecx, dword [0x46a130]
sub esp, 8
test ecx, ecx
jne 0x40f7f5
call fcn.00447440
test eax, eax
je 0x40f5cc
call fcn.00412b40
test eax, eax
jne 0x40faae
mov ebx, 0x45d440
call fcn.004039b0
mov dword [esp], str.about_to_init_tree
call fcn.00428ae0
mov dword [esp + 4], ebx
lea ebx, [ebp - 0xc8]
mov edi, ebx
mov dword [esp], str.All_Games
call fcn.00428910
mov dword [esp], str.did_init_tree
call fcn.00428ae0
call fcn.0043aa20
cld
xor eax, eax
mov ecx, 5
rep stosd dword es:[edi], eax
mov dword [esp + 4], ebx
mov eax, dword [0x46a030]
mov edx, 0xc
mov dword [ebp - 0xbc], edx
mov esi, 0x460900
mov edi, section..data
mov dword [ebp - 0xc8], esi
xor esi, esi
mov dword [ebp - 0xb8], edi
mov edi, 0xffffffff
mov dword [esp], eax
call fcn.00432a40
mov dword [esp + 8], esi
mov ebx, dword [0x46a030]
mov edx, 0x1026
mov dword [esp + 4], edx
mov ecx, 0xffffffff
mov dword [esp + 0xc], ecx
mov dword [esp], ebx
mov ebx, 0x12
call fcn.0044e1c5
mov esi, dword [0x46a030]
sub esp, 0x10
mov ecx, 0x1001
mov dword [esp + 4], ecx
xor eax, eax
mov dword [esp + 0xc], edi
lea edi, [ebp - 0x5f8]
mov dword [esp + 8], eax
mov dword [esp], esi
call fcn.0044e1c5
sub esp, 0x10
call fcn.004145c0
mov dword [esp + 8], eax
mov edx, str._s_bkground.png
mov dword [esp + 4], edx
mov dword [esp], edi
call sub.msvcrt.dll_sprintf
mov dword [ebp - 0xe8], ebx
mov eax, dword [0x46a110]
mov dword [ebp - 0xe0], edi
test eax, eax
jne 0x40fc23
mov dword [esp], 0x80000001
mov edx, 1
mov esi, 0x200
mov dword [ebp - 0x808], esi
lea eax, [ebp - 0x804]
mov ebx, str.Control_PaneldesktopWindowMetrics
mov dword [ebp - 0x80c], edx
xor esi, esi
lea edi, [ebp - 0x808]
mov dword [esp + 4], ebx
lea ebx, [ebp - 0x7f8]
mov dword [esp + 8], eax
call sub.ADVAPI32.DLL_RegOpenKeyA
mov eax, dword [ebp - 0x804]
sub esp, 0xc
lea ecx, [ebp - 0x80c]
mov dword [esp + 0xc], ecx
mov edx, str.Shell_Icon_Size
mov dword [esp + 8], esi
mov esi, 0x20
mov dword [esp + 4], edx
mov dword [esp + 0x14], edi
mov dword [esp + 0x10], ebx
mov dword [esp], eax
call sub.ADVAPI32.DLL_RegQueryValueExA
sub esp, 0x18
mov dword [esp], ebx
call sub.msvcrt.dll_atol
cmp eax, 0x1f
jbe 0x40f1a9
mov esi, 0x30
cmp eax, 0x31
cmovb esi, eax
mov ecx, dword [ebp - 0x804]
xor ebx, ebx
mov dword [esp], ecx
call sub.ADVAPI32.DLL_RegCloseKey
sub esp, 4
cmp dword [str.noroms], 0
jmp 0x40f1cf
inc ebx
mov edi, dword [ebx*8 + 0x460d04]
test edi, edi
jne 0x40f1c5
mov ecx, dword [0x46a030]
mov edi, 0xfffffff0
mov dword [esp + 4], edi
mov edi, 0x30
mov dword [esp], ecx
call fcn.0044e225
mov dword [ebp - 0x830], eax
sub esp, 8
and eax, 0xfffffffc
mov dword [esp + 8], eax
mov eax, dword [0x46a030]
mov edx, 0xfffffff0
mov dword [esp + 4], edx
mov dword [esp], eax
call fcn.0044e1f5
sub esp, 0xc
mov dword [esp], 0x31
call sub.USER32.dll_GetSystemMetrics
sub esp, 4
cmp eax, 0x2f
ja 0x40f235
cmp eax, 0x20
sbb eax, eax
and eax, 0xfffffff0
lea edi, [eax + 0x20]
mov dword [esp], 0x31
call sub.USER32.dll_GetSystemMetrics
sub esp, 4
cmp eax, 0x2f
mov edx, 0x30
ja 0x40f259
cmp eax, 0x20
sbb ecx, ecx
and ecx, 0xfffffff0
lea edx, [ecx + 0x20]
mov dword [esp], edx
mov ecx, 0x1f4
mov eax, 0xff
mov dword [esp + 0x10], ecx
mov dword [esp + 0xc], ebx
mov dword [esp + 4], edi
mov edi, 0xffffffff
mov dword [esp + 8], eax
call sub.COMCTL32.DLL_ImageList_Create
mov dword [0x46a100], eax
sub esp, 0x14
mov ecx, 0x1f4
mov dword [esp + 0x10], ecx
mov eax, 0xff
mov dword [esp + 0xc], ebx
mov dword [esp + 4], esi
mov dword [esp], esi
mov esi, 0xffffffff
mov dword [esp + 8], eax
call sub.COMCTL32.DLL_ImageList_Create
mov dword [0x46a0f0], eax
mov edx, dword [0x46a100]
sub esp, 0x14
mov dword [esp + 4], edi
mov dword [esp], edx
call sub.COMCTL32.DLL_ImageList_Remove
mov ebx, dword [0x46a0f0]
sub esp, 8
mov dword [esp + 4], esi
mov dword [esp], ebx
call sub.COMCTL32.DLL_ImageList_Remove
mov eax, dword [0x46a0e0]
sub esp, 8
test eax, eax
je 0x40f30b
xor edx, edx
cmp edx, dword [0x46a070]
jl 0x40f2fb
jmp 0x40f30b
mov eax, dword [0x46a0e0]
mov dword [eax + edx*4], 0
inc edx
cmp edx, dword [0x46a070]
jl 0x40f2f6
mov eax, dword [str.noroms]
xor esi, esi
jmp 0x40f36a
mov dword [esp], eax
call fcn.00401660
test eax, eax
mov ebx, eax
je 0x40f8b0
mov dword [esp + 8], ebx
mov ecx, dword [0x46a100]
mov edx, 0xffffffff
mov dword [esp + 4], edx
inc esi
mov dword [esp], ecx
call sub.COMCTL32.DLL_ImageList_ReplaceIcon
mov edi, dword [0x46a0f0]
sub esp, 0xc
mov eax, 0xffffffff
mov dword [esp + 8], ebx
mov dword [esp + 4], eax
mov dword [esp], edi
call sub.COMCTL32.DLL_ImageList_ReplaceIcon
mov eax, dword [esi*8 + 0x460d04]
sub esp, 0xc
test eax, eax
jne 0x40f314
mov edx, dword [0x46a100]
mov ecx, 1
mov eax, 0x1003
mov dword [esp + 8], ecx
mov edi, dword [0x46a030]
xor esi, esi
mov dword [esp + 4], eax
mov dword [esp + 0xc], edx
mov dword [esp], edi
mov edi, 0xfffffff0
call fcn.0044e1c5
mov ecx, dword [0x46a030]
sub esp, 0x10
mov edx, 0x1003
mov dword [esp + 4], edx
mov ebx, dword [0x46a0f0]
mov dword [esp + 8], esi
mov esi, 2
mov dword [esp], ecx
mov dword [esp + 0xc], ebx
call fcn.0044e1c5
mov ebx, dword [0x46a030]
sub esp, 0x10
mov eax, dword [ebp - 0x830]
mov dword [esp + 4], edi
mov edi, 0xb6
mov dword [esp], ebx
mov dword [esp + 8], eax
call fcn.0044e1f5
sub esp, 0xc
mov ecx, 0xff
mov edx, 2
mov dword [esp + 8], ecx
mov eax, 0x10
mov dword [esp + 0xc], edx
mov dword [esp + 0x10], esi
mov esi, 0xffffffff
mov dword [esp + 4], eax
mov dword [esp], 0x10
call sub.COMCTL32.DLL_ImageList_Create
mov dword [0x46a230], eax
mov ebx, dword [0x46a020]
sub esp, 0x14
mov dword [esp + 4], edi
mov edi, 0xffffffff
mov dword [esp], ebx
call fcn.0044e135
mov edx, dword [0x46a230]
sub esp, 8
mov dword [esp + 4], esi
mov dword [esp + 8], eax
mov dword [esp], edx
call sub.COMCTL32.DLL_ImageList_ReplaceIcon
mov eax, dword [0x46a020]
mov ecx, 0xb7
sub esp, 0xc
mov dword [esp + 4], ecx
mov dword [esp], eax
call fcn.0044e135
mov ebx, dword [0x46a230]
sub esp, 8
mov dword [esp + 4], edi
mov dword [esp + 8], eax
mov dword [esp], ebx
call sub.COMCTL32.DLL_ImageList_ReplaceIcon
mov edx, dword [0x46a030]
sub esp, 0xc
mov esi, dword [0x46a230]
mov dword [esp], edx
mov dword [esp + 4], esi
lea esi, [ebp - 0x818]
call fcn.00434eb0
call fcn.00407b20
call fcn.00412ce0
mov dword [ebp - 0x818], eax
mov edi, dword [0x46a070]
mov ecx, 0x402330
mov dword [esp + 0x10], ecx
mov ebx, dword [0x46e140]
mov eax, 8
mov dword [esp + 0xc], eax
mov dword [esp + 8], edi
mov dword [esp + 4], ebx
mov dword [esp], esi
call sub.msvcrt.dll_bsearch
test eax, eax
mov edx, 0xffffffff
je 0x40f4f8
mov edx, dword [eax + 4]
mov dword [esp + 4], edx
mov eax, dword [0x46a030]
mov edi, 1
lea esi, [ebp - 0xa8]
mov dword [esp], eax
call fcn.00432ef0
mov dword [0x46a060], edi
mov ebx, dword [0x46a030]
mov dword [esp], ebx
call sub.USER32.dll_SetFocus
sub esp, 4
mov dword [esp], esi
call fcn.00412e00
mov dword [esp], esi
call fcn.0042b490
mov dword [0x46a190], eax
test eax, eax
mov esi, eax
je 0x40f5bf
mov eax, dword [0x45cee0]
mov edi, dword [0x46a010]
mov ecx, dword [eax]
test ecx, ecx
je 0x40f59c
xor ebx, ebx
mov edx, dword [ebx + eax + 8]
test edx, edx
je 0x40f592
add eax, ebx
cmp dword [eax], 1
je 0x40fc52
mov eax, dword [eax + 4]
mov dword [esp + 8], esi
xor edx, edx
mov ecx, 0x30
mov dword [esp + 0xc], edx
mov dword [esp + 4], ecx
mov dword [esp], eax
call fcn.0044e1c5
mov eax, dword [0x45cee0]
sub esp, 0x10
add ebx, 0x14
mov ecx, dword [ebx + eax]
test ecx, ecx
jne 0x40f559
mov esi, dword [0x46a030]
xor ebx, ebx
mov dword [esp + 4], ebx
mov dword [esp], esi
call sub.USER32.dll_GetDlgItem
sub esp, 8
test eax, eax
je 0x40f5bf
mov dword [esp], eax
call fcn.0042a170
call fcn.00447be0
test eax, eax
jne 0x40f8d4
mov dword [esp], 0
call sub.KERNEL32.dll_GetModuleHandleA
xor esi, esi
sub esp, 4
mov ecx, 0x436f60
mov dword [esp + 0x10], esi
xor edx, edx
mov edi, 0x72
mov dword [esp + 0xc], ecx
mov dword [esp + 8], edx
mov dword [esp + 4], edi
mov dword [esp], eax
call fcn.0044e045
sub esp, 0x14
jmp 0x40e815
mov dword [esp], eax
call sub.msvcrt.dll_free
jmp 0x40e710
mov ebx, dword [ebp - 0x81c]
mov edi, 0x30
xor esi, esi
mov dword [ebp - 0x1a8], edi
xor ecx, ecx
xor eax, eax
mov dword [ebp - 0x1a4], esi
xor edi, edi
mov edx, 0x40e400
mov dword [ebp - 0x1a0], edx
xor esi, esi
xor edx, edx
mov dword [ebp - 0x19c], ecx
xor ecx, ecx
mov dword [ebp - 0x198], eax
xor eax, eax
mov dword [ebp - 0x194], ebx
mov ebx, str.BackMainWindowClass
mov dword [ebp - 0x190], edi
lea edi, [ebp - 0x1a8]
mov dword [ebp - 0x17c], esi
mov dword [ebp - 0x18c], edx
mov dword [ebp - 0x188], ecx
mov dword [ebp - 0x184], eax
mov dword [ebp - 0x180], ebx
mov dword [esp], edi
call fcn.0044dcb5
sub esp, 4
test ax, ax
je 0x40e703
call sub.USER32.dll_GetDesktopWindow
mov dword [esp], eax
lea edi, [ebp - 0x158]
mov esi, 0xd2
mov dword [esp + 4], edi
xor edi, edi
call sub.USER32.dll_GetWindowRect
mov ebx, dword [ebp - 0x81c]
sub esp, 8
mov dword [esp + 4], esi
xor esi, esi
mov dword [esp], ebx
call fcn.0044e075
mov dword [0x46a220], eax
sub esp, 8
lea edx, [ebp - 0x178]
mov dword [esp + 8], edx
mov ecx, 0x18
mov dword [esp + 4], ecx
mov dword [esp], eax
call fcn.0044e195
sub esp, 0xc
xor eax, eax
mov edx, dword [ebp - 0x170]
mov dword [esp + 0x2c], eax
mov eax, dword [ebp - 0x14c]
mov dword [esp + 0x28], ebx
mov ebx, dword [ebp - 0x174]
sub eax, edx
mov dword [esp + 0x20], esi
mov esi, dword [ebp - 0x150]
mov ecx, eax
mov dword [esp + 0x24], edi
shr ecx, 0x1f
sub esi, ebx
mov dword [esp + 0x1c], edx
mov edi, esi
add eax, ecx
mov dword [esp + 0x18], ebx
shr edi, 0x1f
mov edx, 0x80000000
mov dword [esp + 0xc], edx
sar eax, 1
add esi, edi
mov dword [esp + 0x14], eax
mov ecx, str.Main_Backgound_windows
sar esi, 1
mov dword [esp + 8], ecx
mov eax, str.BackMainWindowClass
mov dword [esp + 0x10], esi
mov dword [esp + 4], eax
mov dword [esp], pe_nt_image_headers32
call fcn.0044de95
mov dword [0x46a210], eax
sub esp, 0x30
mov dword [esp], eax
call sub.USER32.dll_GetDC
mov dword [0x46d2a0], eax
sub esp, 4
mov dword [esp], eax
call sub.GDI32.dll_CreateCompatibleDC
mov dword [0x46e160], eax
mov ebx, dword [0x46a220]
sub esp, 4
mov dword [esp], eax
mov dword [esp + 4], ebx
call sub.GDI32.dll_SelectObject
sub esp, 8
call fcn.004131e0
test eax, eax
jne 0x40f7cb
mov ecx, dword [0x46a210]
mov dword [esp], ecx
call sub.USER32.dll_UpdateWindow
sub esp, 4
jmp 0x40e703
mov ebx, dword [0x46a210]
mov eax, 5
mov dword [esp + 4], eax
mov dword [esp], ebx
call sub.USER32.dll_ShowWindow
sub esp, 8
jmp 0x40f7b5
test ebx, ebx
jmp 0x40ef98
xor eax, eax
jmp 0x40efa3
mov edi, dword [0x46a010]
mov esi, 1
mov ebx, 1
mov dword [esp], edi
call sub.USER32.dll_GetMenu
sub esp, 4
mov edx, 0x9c70
mov dword [esp + 4], edx
mov dword [esp + 8], esi
mov esi, 1
mov dword [esp], eax
call sub.USER32.dll_EnableMenuItem
mov eax, dword [0x46a010]
sub esp, 0xc
mov dword [esp], eax
call sub.USER32.dll_GetMenu
sub esp, 4
mov ecx, 0x9c71
mov dword [esp + 4], ecx
mov dword [esp + 8], ebx
mov ebx, 1
mov dword [esp], eax
call sub.USER32.dll_EnableMenuItem
mov edi, dword [0x46a010]
sub esp, 0xc
mov dword [esp], edi
call sub.USER32.dll_GetMenu
sub esp, 4
mov edx, 0x9ca0
mov dword [esp + 4], edx
mov dword [esp + 8], esi
mov dword [esp], eax
call sub.USER32.dll_EnableMenuItem
mov eax, dword [0x46a010]
sub esp, 0xc
mov dword [esp], eax
call sub.USER32.dll_GetMenu
sub esp, 4
mov ecx, 0x9c4f
mov dword [esp + 8], ebx
mov dword [esp + 4], ecx
mov dword [esp], eax
call sub.USER32.dll_EnableMenuItem
sub esp, 0xc
jmp 0x40eff1
movzx edx, word [esi*8 + 0x460d00]
mov ebx, dword [0x46a020]
mov dword [esp + 4], edx
mov dword [esp], ebx
call fcn.0044e135
sub esp, 8
mov ebx, eax
jmp 0x40f326
call fcn.00404890
call fcn.00407300
mov eax, dword [ebp - 0x81c]
mov ebx, 0x6a
mov dword [esp + 4], ebx
mov dword [esp], eax
call fcn.0044e015
mov dword [0x46a180], eax
sub esp, 8
xor eax, eax
nop
xor edi, edi
mov dword [eax*4 + 0x46d300], edi
inc eax
cmp eax, 0x246
jle 0x40f900
mov dword [esp], str.keyboard_gui_state_cleared._n
xor esi, esi
call fcn.00428ae0
mov edi, 0x20
call dword [esi + 0x45c0cc]
lea ebx, [esi + 0x45c088]
add esi, 0x70
mov dword [esp], ebx
mov dword [esp + 4], eax
call dword [sym.imp.mameplib.dll_seq_copy]
dec edi
jns 0x40f924
call fcn.004129c0
dec eax
je 0x40fd24
xor ebx, ebx
mov dword [0x46a170], ebx
xor eax, eax
call fcn.00408130
xor eax, eax
call fcn.00402190
call fcn.00414ef0
test eax, eax
jne 0x40fc69
mov dword [esp], str.about_to_show_window
call fcn.00428ae0
call fcn.00412d60
mov ebx, eax
test eax, eax
sete al
cmp ebx, 6
sete dl
or eax, edx
test al, 1
jne 0x40faa4
cmp ebx, 2
je 0x40faa4
call fcn.00414f10
test eax, eax
jne 0x40fcbd
call fcn.004131e0
test eax, eax
je 0x40fa1a
mov esi, dword [0x46a210]
test esi, esi
je 0x40fa1a
mov ecx, dword [0x46a220]
mov dword [esp], ecx
call sub.GDI32.dll_DeleteObject
mov edx, dword [0x46a210]
sub esp, 4
mov esi, dword [0x46d2b0]
mov dword [esp], edx
mov dword [esp + 4], esi
call sub.USER32.dll_ReleaseDC
mov eax, dword [0x46e160]
sub esp, 8
mov edi, dword [0x46a210]
mov dword [esp + 4], eax
mov dword [esp], edi
call sub.USER32.dll_ReleaseDC
mov ecx, dword [0x46a210]
sub esp, 8
mov dword [esp], ecx
call sub.USER32.dll_DestroyWindow
sub esp, 4
mov dword [esp + 4], ebx
mov ebx, dword [0x46a010]
mov dword [esp], ebx
call sub.USER32.dll_ShowWindow
sub esp, 8
call fcn.00412980
cmp eax, 1
je 0x40fd1a
jle 0x40fd70
cmp eax, 2
je 0x40fe22
cmp eax, 3
je 0x40fa9d
mov eax, 0x9c4b
call fcn.00403580
call fcn.00412a00
test eax, eax
jle 0x40fa93
call fcn.00412a00
imul edx, eax, 0x3e8
mov edi, dword [0x46a010]
mov eax, 2
mov dword [esp + 4], eax
xor esi, esi
mov dword [esp + 0xc], esi
mov dword [esp], edi
mov dword [esp + 8], edx
call sub.USER32.dll_SetTimer
sub esp, 0x10
mov edx, 1
jmp 0x40e820
mov eax, 0x9c4a
jmp 0x40fa56
mov ebx, 9
jmp 0x40f9a3
call fcn.004145c0
mov dword [ebp - 0x828], eax
xor edi, edi
mov dword [esp], 0x6400
call sub.msvcrt.dll_malloc
mov dword [ebp - 0x82c], eax
test eax, eax
je 0x40f00b
mov esi, dword [ebp - 0x828]
mov edx, str._s.bmp
lea eax, [ebp - 0x3d8]
mov dword [esp + 4], edx
lea ebx, [ebp - 0x2c8]
mov dword [esp], eax
mov dword [esp + 8], esi
call sub.msvcrt.dll_sprintf
mov dword [esp + 4], ebx
lea ecx, [ebp - 0x3d8]
mov dword [esp], ecx
call sub.msvcrt.dll__findfirst
cmp eax, 0xffffffff
mov esi, eax
je 0x40fb68
mov ebx, dword [ebp - 0x82c]
mov dword [esp], ebx
lea ecx, [ebp - 0x2b4]
mov eax, 0x100
mov dword [esp + 4], ecx
inc edi
add ebx, 0x100
mov dword [esp + 8], eax
call sub.msvcrt.dll_memcpy
mov dword [esp], esi
lea edx, [ebp - 0x2c8]
mov dword [esp + 4], edx
call sub.msvcrt.dll__findnext
test eax, eax
sete cl
xor eax, eax
cmp edi, 0x63
setle al
test ecx, eax
jne 0x40fb1b
mov dword [esp], esi
call sub.msvcrt.dll__findclose
mov eax, dword [ebp - 0x828]
mov ecx, str._s.png
lea edx, [ebp - 0x3d8]
mov dword [esp + 4], ecx
lea esi, [ebp - 0x2c8]
lea ebx, [ebp - 0x3d8]
mov dword [esp], edx
mov dword [esp + 8], eax
call sub.msvcrt.dll_sprintf
mov dword [esp + 4], esi
mov dword [esp], ebx
call sub.msvcrt.dll__findfirst
cmp eax, 0xffffffff
mov esi, eax
je 0x40fc08
cmp edi, 0x63
jg 0x40fc00
mov edx, dword [ebp - 0x82c]
mov ecx, edi
shl ecx, 8
lea ebx, [ecx + edx]
mov dword [esp], ebx
lea edx, [ebp - 0x2b4]
mov eax, 0x100
mov dword [esp + 4], edx
inc edi
add ebx, 0x100
mov dword [esp + 8], eax
call sub.msvcrt.dll_memcpy
mov dword [esp], esi
lea ecx, [ebp - 0x2c8]
mov dword [esp + 4], ecx
call sub.msvcrt.dll__findnext
test eax, eax
sete dl
xor eax, eax
cmp edi, 0x63
setle al
test edx, eax
jne 0x40fbbb
mov dword [esp], esi
call sub.msvcrt.dll__findclose
test edi, edi
jne 0x40fd82
mov ecx, dword [ebp - 0x82c]
mov dword [esp], ecx
call sub.msvcrt.dll_free
jmp 0x40f00b
mov edx, dword [0x46a030]
xor ecx, ecx
lea edi, [ebp - 0xe8]
mov dword [esp + 0xc], edi
mov esi, 0x1044
mov dword [esp + 8], ecx
mov dword [esp + 4], esi
mov dword [esp], edx
call fcn.0044e1c5
sub esp, 0x10
jmp 0x40f116
mov eax, dword [eax + 4]
mov dword [esp], edi
mov dword [esp + 4], eax
call sub.USER32.dll_GetDlgItem
sub esp, 8
jmp 0x40f56f
mov dword [esp], 1
call sub.USER32.dll_GetSystemMetrics
mov ecx, eax
sub esp, 4
shr ecx, 0x1f
mov dword [esp], 0
lea esi, [eax + ecx]
sar esi, 1
call sub.USER32.dll_GetSystemMetrics
mov edx, eax
sub esp, 4
shr edx, 0x1f
mov dword [esp + 4], esi
add eax, edx
sar eax, 1
mov dword [esp], eax
call sub.USER32.dll_SetCursorPos
sub esp, 8
mov dword [esp], 0
call sub.USER32.dll_ShowCursor
sub esp, 4
jmp 0x40f972
mov eax, dword [0x46a010]
xor edx, edx
mov edi, 0xfffffff0
mov dword [esp + 4], edx
mov esi, 0xfffffff0
mov dword [esp], eax
call sub.USER32.dll_SetMenu
mov ecx, dword [0x46a010]
sub esp, 8
mov dword [esp + 4], edi
mov dword [esp], ecx
call fcn.0044e225
mov ebx, dword [0x46a010]
sub esp, 8
and eax, 0xff7fffff
mov dword [esp + 8], eax
mov dword [esp + 4], esi
mov dword [esp], ebx
mov ebx, 3
call fcn.0044e1f5
sub esp, 0xc
jmp 0x40f9b0
mov eax, 0x9c48
jmp 0x40fa56
mov edx, 0x45d890
mov dword [0x46a170], edx
call dword [0x45d890]
test eax, eax
jne 0x40f94f
mov ecx, dword [0x46a010]
mov eax, 0x64
xor edi, edi
mov dword [esp + 0xc], edi
mov esi, 1
mov dword [esp + 8], eax
mov dword [esp + 4], esi
mov dword [esp], ecx
call sub.USER32.dll_SetTimer
sub esp, 0x10
jmp 0x40f957
test eax, eax
jne 0x40fa51
mov eax, 0x9c47
jmp 0x40fa56
mov dword [esp], 0
call sub.msvcrt.dll_time
mov dword [esp], eax
call sub.msvcrt.dll_srand
call sub.msvcrt.dll_rand
cdq
mov esi, dword [ebp - 0x82c]
mov ebx, dword [ebp - 0x828]
idiv edi
mov edi, 0x460c75
mov dword [esp + 8], ebx
mov dword [esp + 4], edi
shl edx, 8
add edx, esi
mov dword [esp + 0xc], edx
lea eax, [ebp - 0x3d8]
xor esi, esi
mov dword [esp], eax
lea ebx, [ebp - 0x4e8]
call sub.msvcrt.dll_sprintf
call fcn.004145c0
mov dword [esp + 8], eax
mov edx, str._s_bkground.png
lea edi, [ebp - 0x3d8]
mov dword [esp + 4], edx
mov dword [esp], ebx
call sub.msvcrt.dll_sprintf
mov dword [esp], ebx
mov ecx, pe_nt_image_headers32
mov dword [esp + 4], ecx
call sub.KERNEL32.dll_SetFileAttributesA
sub esp, 8
mov dword [esp + 8], esi
mov dword [esp + 4], ebx
mov dword [esp], edi
call sub.KERNEL32.dll_CopyFileA
sub esp, 0xc
jmp 0x40fc10
mov eax, 0x9c49
jmp 0x40fa56