Function at 0x4070a0
Capabilities:
Check if process is running under wine
Check os version
Delete file
Delete registry value
Query or enumerate registry value
Set environment variable
Set registry value
Shutdown system
Terminate process

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x74
call dbg.__main
call dword [sym.imp.comctl32.dll_InitCommonControls]
mov dword [esp + 0xc], 0x40
mov dword [esp + 8], 0x40d2e0
mov dword [esp + 4], 1
mov dword [esp], 0
call dword [sym.imp.user32.dll_LoadStringA]
sub esp, 0x10
test eax, eax
jne 0x4070e7
mov byte [0x40d2e0], 0
mov dword [esp], str.kernel32.dll
mov edi, dword [sym.imp.kernel32.dll_GetModuleHandleA]
call edi
sub esp, 4
mov dword [esp + 4], str.IsWow64Process
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_GetProcAddress]
sub esp, 8
test eax, eax
je 0x4071ef
mov dword [esp + 4], 0x40d2d8
mov dword [esp], 0xffffffff
call eax
sub esp, 8
test eax, eax
je 0x4071ef
cmp dword [ebp + 8], 1
jle 0x4076d5
mov dword [ebp - 0x40], 1
mov esi, dword [sym.imp.msvcrt.dll_strcmp]
mov ebx, 1
mov dword [ebp - 0x3c], 0
mov dword [ebp - 0x50], 1
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x4c], 0
mov dword [ebp - 0x48], 0
mov dword [ebp - 0x44], edi
lea esi, [esi]
lea eax, [ebx*4]
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp + 0xc]
mov edi, dword [eax + ebx*4]
test edi, edi
je 0x407213
mov dword [esp + 4], str.__help
mov dword [esp], edi
call esi
test eax, eax
je case.0x4071e8.0
mov dword [esp + 4], str.__version
mov dword [esp], edi
call esi
test eax, eax
je 0x407547
movzx eax, byte [edi]
and eax, 0xfffffffd
cmp al, 0x2d
jne 0x407200
cmp byte [edi + 2], 0
jne 0x407200
movsx edx, byte [edi + 1]
lea eax, [edx - 0x3f]
cmp al, 0x39
ja case.0x4071e8.1
movzx eax, al
jmp dword [eax*4 + 0x40b700]
xor eax, eax
mov dword [0x40d2d8], eax
jmp 0x407131
mov eax, edi
call dbg.add_filter
add ebx, 1
cmp dword [ebp + 8], ebx
jg 0x407188
cmp dword [ebp - 0x30], 0
mov edi, dword [ebp - 0x44]
je 0x4075b8
cmp dword [0x40d050], 0
je 0x40723d
mov dword [esp + 4], str.ignoring_tag_for_submission
mov dword [esp], 7
call dbg.report
mov eax, dword [ebp - 0x30]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x38]
mov dword [esp], eax
call dbg.send_file
cmp dword [ebp - 0x3c], 0
jne 0x407577
mov eax, dword [0x40d2d4]
test eax, eax
je 0x407267
mov eax, 3
mov dword [esp], eax
call dword [sym.imp.msvcrt.dll_exit]
call dbg.usage
xor ebx, ebx
mov dword [esp], ebx
call dword [sym.imp.msvcrt.dll_exit]
mov dword [esp + 8], edx
mov dword [esp + 4], str.invalid_option:___c
mov dword [esp], 8
call dbg.report
call dbg.usage
mov dword [esp], 2
call dword [sym.imp.msvcrt.dll_exit]
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 0x2c]
add ebx, 1
mov eax, dword [eax + ecx + 4]
mov dword [ebp - 0x30], eax
test eax, eax
jne 0x407207
jmp 0x407298
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 0x2c]
add ebx, 1
mov eax, dword [eax + ecx + 4]
mov dword [0x40d050], eax
test eax, eax
je 0x407298
mov dword [esp], eax
call dword [sym.imp.msvcrt.dll_strlen]
cmp eax, 0x1e
ja 0x407613
mov eax, dword [0x40d050]
mov dword [esp], eax
call dbg.findbadtagchar
test eax, eax
je 0x407207
movsx eax, byte [eax]
mov dword [esp + 4], str.invalid_char_in_tag:__c
mov dword [esp + 8], eax
jmp 0x40728c
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 0x2c]
add ebx, 1
mov eax, dword [eax + ecx + 4]
mov dword [0x40d048], eax
test eax, eax
jne 0x407207
jmp 0x407298
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 0x2c]
add ebx, 1
mov eax, dword [eax + ecx + 4]
mov dword [ebp - 0x38], eax
test eax, eax
jne 0x407207
jmp 0x407298
mov dword [esp], 0xb
xor edi, edi
call dbg.report
mov dword [ebp - 0x40], edi
jmp 0x407207
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 0x2c]
add ebx, 1
mov eax, dword [eax + ecx + 4]
mov dword [ebp - 0x4c], eax
jmp 0x407207
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 0x2c]
add ebx, 1
mov eax, dword [eax + ecx + 4]
mov dword [0x40d04c], eax
test eax, eax
jne 0x407207
jmp 0x407298
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 0x2c]
add ebx, 1
mov eax, dword [eax + ecx + 4]
mov dword [0x40d044], eax
test eax, eax
jne 0x407207
jmp 0x407298
mov dword [0x40d2c0], 1
jmp 0x407207
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 0x2c]
add ebx, 1
mov eax, dword [eax + ecx + 4]
mov dword [ebp - 0x48], eax
test eax, eax
jne 0x407207
jmp 0x407298
mov dword [esp], 0xc
call dbg.report
xor ecx, ecx
add dword [0x40d2d0], 1
mov dword [ebp - 0x40], ecx
jmp 0x407207
mov dword [esp], 0xb
add ebx, 1
call dbg.report
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 0x2c]
mov eax, dword [eax + ecx + 4]
mov dword [ebp - 0x34], eax
test eax, eax
je 0x407662
mov edi, dword [ebp - 0x34]
mov dword [esp], 5
mov dword [esp + 4], edi
call dbg.report
xor eax, eax
mov dword [esp], edi
mov dword [esp + 4], eax
call dword [sym.imp.kernel32.dll_CreateDirectoryA]
push edx
push edx
test eax, eax
jne 0x407462
mov eax, dword fs:[0x18]
cmp dword [eax + 0x34], 0xb7
jne 0x40763e
xor edx, edx
mov dword [esp + 4], str.Counting_tests
xor eax, eax
mov dword [esp], edx
mov dword [0x40d32c], eax
call dbg.report
xor ecx, ecx
mov dword [esp + 0xc], 0x40d32c
mov edi, dword [sym.imp.kernel32.dll_EnumResourceNamesA]
mov dword [esp + 8], dbg.EnumTestFileProc
mov dword [esp + 4], str.TESTRES
mov dword [esp], ecx
call edi
sub esp, 0x10
test eax, eax
je 0x4075ed
imul eax, dword [0x40d32c], 0x14
mov dword [esp], eax
call sym._xalloc
mov dword [esp + 4], str.Extracting_tests
mov dword [0x40d330], eax
xor eax, eax
mov dword [esp], eax
call dbg.report
mov eax, dword [0x40d32c]
mov dword [esp], 1
mov dword [esp + 8], eax
xor eax, eax
mov dword [esp + 4], eax
call dbg.report
xor eax, eax
mov dword [0x40d32c], eax
mov eax, dword [ebp - 0x34]
mov dword [esp + 8], dbg.extract_only_proc
mov dword [esp + 0xc], eax
xor eax, eax
mov dword [esp + 4], str.TESTRES
mov dword [esp], eax
call edi
sub esp, 0x10
test eax, eax
je 0x4075c7
xor edi, edi
mov dword [esp + 8], str.Extracting:_Done
mov dword [esp + 4], edi
mov dword [esp], 3
call dbg.report
jmp 0x407207
mov dword [ebp - 0x3c], 1
jmp 0x407207
cmp byte [0x40d2e0], 0
mov edx, 0x40d2e0
mov eax, str.unknown
mov dword [esp], str.__12.12s_n
cmovne eax, edx
mov dword [esp + 4], eax
call dword [sym.imp.msvcrt.dll_printf]
xor eax, eax
mov dword [esp], eax
call dword [sym.imp.msvcrt.dll_exit]
lea eax, [ebp - 0x20]
mov dword [esp + 4], 0x20
mov dword [esp + 8], eax
mov dword [esp], 0xffffffff
call dword [sym.imp.advapi32.dll_OpenProcessToken]
sub esp, 0xc
test eax, eax
jne 0x40766e
xor eax, eax
mov dword [esp], 0x19
mov dword [esp + 4], eax
call dword [sym.imp.user32.dll_ExitWindowsEx]
push edx
push edx
jmp 0x407259
cmp dword [ebp - 0x34], 0
jne 0x40724f
jmp 0x4076f3
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x34]
mov dword [esp + 4], str.Cant_enumerate_test_files:__d
mov dword [esp], 9
mov dword [esp + 8], eax
call dbg.report
jmp 0x40751c
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x34]
mov dword [esp + 4], str.Cant_enumerate_test_files:__d
mov dword [esp], 9
mov dword [esp + 8], eax
call dbg.report
jmp 0x4074ab
mov dword [esp + 8], 0x1e
mov dword [esp + 4], str.tag_is_too_long__maximum__d_characters_
mov dword [esp], 9
call dbg.report
jmp 0x4072ec
xor ecx, ecx
mov dword [ebp - 0x50], ecx
jmp 0x407207
mov eax, dword [eax + 0x34]
mov dword [esp + 8], edi
mov dword [esp + 4], str.Could_not_create_directory:__s___d_
mov dword [esp + 0xc], eax
mov dword [esp], 9
call dbg.report
jmp 0x407462
mov dword [ebp - 0x34], str..wct
jmp 0x407427
xor ecx, ecx
lea eax, [ebp - 0x18]
mov dword [esp + 4], str.SeShutdownPrivilege
xor esi, esi
mov dword [esp], ecx
lea ebx, [ebp - 0x1c]
xor edi, edi
mov dword [esp + 8], eax
call dword [sym.imp.advapi32.dll_LookupPrivilegeValueA]
mov dword [ebp - 0x1c], 1
sub esp, 0xc
mov dword [ebp - 0x10], 2
mov dword [esp + 0x14], esi
mov dword [esp + 0x10], esi
mov dword [esp + 0xc], esi
mov dword [esp + 8], ebx
mov dword [esp + 4], edi
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_AdjustTokenPrivileges]
mov eax, dword [ebp - 0x20]
sub esp, 0x18
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_CloseHandle]
push eax
jmp 0x40759e
xor edx, edx
xor eax, eax
mov dword [ebp - 0x40], 1
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x38], edx
mov dword [ebp - 0x4c], edx
mov dword [ebp - 0x48], edx
mov dword [ebp - 0x50], 1
call dword [sym.imp.kernel32.dll_GetVersion]
mov dword [ebp - 0x2c], eax
mov esi, eax
xor eax, eax
mov dword [esp + 4], str.Starting_up
mov dword [esp], eax
call dbg.report
test esi, esi
js 0x407ae1
call dbg.running_on_visible_desktop
test eax, eax
je 0x407a61
call sym._running_under_wine
test eax, eax
jne 0x4077a1
xor esi, esi
mov dword [esp + 4], 1
mov dword [esp], dbg.ctrl_handler
call dword [sym.imp.kernel32.dll_SetConsoleCtrlHandler]
push eax
push eax
cmp dword [ebp - 0x50], 0
jne 0x407a7a
cmp dword [0x40d2c8], 0
je 0x407767
cmp dword [0x40d2c0], 0
je 0x407afa
mov ebx, dword [ebp - 0x40]
jmp 0x40777a
call dbg.guiAskTag
cmp eax, 3
je 0x407962
cmp dword [0x40d050], 0
jne 0x40793c
test ebx, ebx
jne 0x40776c
mov dword [esp + 4], str.Please_specify_a_tag___t_option__if_running_noninteractive_
mov dword [esp], 9
call dbg.report
jmp 0x40776c
xor eax, eax
mov dword [esp + 0x10], 3
mov dword [esp + 0x18], eax
mov dword [esp + 0x14], eax
xor eax, eax
mov dword [esp + 0xc], eax
mov dword [esp + 8], 3
mov dword [esp + 4], 0x80000000
mov dword [esp], str..MountPointManager
call dword [sym.imp.kernel32.dll_CreateFileA]
sub esp, 0x1c
cmp eax, 0xffffffff
je 0x407c08
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_CloseHandle]
push eax
call dbg.check_wow64_registry
test eax, eax
je 0x407bef
xor eax, eax
xor ebx, ebx
xor esi, esi
mov dword [esp], eax
call edi
xor ecx, ecx
xor edi, edi
push edx
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x28], eax
mov dword [esp + 0x24], ebx
mov dword [esp + 0x20], ebx
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x18], 0x80000000
mov dword [esp + 0x14], esi
mov dword [esp + 0x10], 0x80000000
mov dword [esp + 0xc], 0xcf0000
mov dword [esp + 8], 0x40a99b
mov dword [esp + 4], str.STATIC
mov dword [esp], edi
call dword [sym.imp.user32.dll_CreateWindowExA]
sub esp, 0x30
test eax, eax
je 0x407bd6
mov dword [esp], eax
call dword [sym.imp.user32.dll_DestroyWindow]
push edi
cmp dword [ebp - 0x40], 0
jne 0x40772e
lea eax, [ebp - 0x28]
mov dword [esp + 4], str.SoftwareWineWineDbg
xor esi, esi
mov dword [esp + 8], eax
mov dword [esp], 0x80000001
call dword [sym.imp.advapi32.dll_RegCreateKeyA]
sub esp, 0xc
test eax, eax
jne 0x407730
lea eax, [ebp - 0x1c]
mov dword [ebp - 0x1c], 4
xor esi, esi
lea ebx, [ebp - 0x20]
mov dword [esp + 0x14], eax
lea eax, [ebp - 0x24]
mov dword [esp + 8], esi
mov esi, 1
mov dword [esp + 0x10], ebx
mov dword [esp + 0xc], eax
mov dword [esp + 4], str.ShowCrashDialog
mov eax, dword [ebp - 0x28]
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegQueryValueExA]
sub esp, 0x18
test eax, eax
jne 0x4078f4
cmp dword [ebp - 0x24], 4
mov esi, 2
jne 0x4078f4
xor eax, eax
cmp dword [ebp - 0x20], 0
setne al
mov esi, eax
add esi, esi
xor edx, edx
xor eax, eax
mov dword [ebp - 0x20], eax
mov dword [esp + 8], edx
mov dword [esp + 0x14], 4
mov dword [esp + 0x10], ebx
mov dword [esp + 0xc], 4
mov dword [esp + 4], str.ShowCrashDialog
mov eax, dword [ebp - 0x28]
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegSetValueExA]
mov eax, dword [ebp - 0x28]
sub esp, 0x18
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegCloseKey]
push ecx
jmp 0x407730
mov dword [esp], 4
call dbg.report
mov ebx, dword [ebp - 0x40]
cmp dword [0x40d044], 0
jne 0x40799f
test ebx, ebx
je 0x407996
call dbg.guiAskEmail
cmp eax, 3
jne 0x40794b
mov dword [esp], 1
call dword [sym.imp.msvcrt.dll_exit]
mov dword [esp + 4], str.Please_specify_an_email_address___m_option__to_enable_developers_n____to_contact_you_about_your_report_if_necessary.
mov dword [esp], 9
call dbg.report
call dbg.guiAskEmail
cmp eax, 3
je 0x407962
cmp dword [0x40d044], 0
jne 0x40799f
cmp dword [0x40d048], 0
je 0x40796f
cmp byte [0x40d2e0], 0
je 0x407bbd
cmp dword [ebp - 0x48], 0
mov edx, dword [ebp - 0x4c]
je 0x407b17
mov eax, dword [ebp - 0x48]
xor ebx, ebx
call dbg.run_tests
mov eax, dword [0x40d2d4]
mov dword [esp + 4], str.Finished____u_failures
mov dword [esp], ebx
mov dword [esp + 8], eax
call dbg.report
test esi, esi
je 0x40724f
lea eax, [ebp - 0x20]
mov dword [ebp - 0x1c], 1
mov dword [esp + 8], eax
mov dword [esp + 4], str.SoftwareWineWineDbg
mov dword [esp], 0x80000001
call dword [sym.imp.advapi32.dll_RegOpenKeyA]
sub esp, 0xc
test eax, eax
jne 0x40724f
sub esi, 1
mov eax, dword [ebp - 0x20]
je 0x407c8b
lea edx, [ebp - 0x1c]
mov dword [esp + 0x14], 4
mov dword [esp + 0x10], edx
xor edx, edx
mov dword [esp + 0xc], 4
mov dword [esp + 8], edx
mov dword [esp + 4], str.ShowCrashDialog
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegSetValueExA]
sub esp, 0x18
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegCloseKey]
push eax
jmp 0x40724f
mov dword [esp + 4], str.Tests_must_be_run_on_a_visible_desktop
mov dword [esp], 9
call dbg.report
jmp 0x407725
call sym._running_under_wine
mov edx, str.wine
mov ebx, dword [sym.imp.kernel32.dll_SetEnvironmentVariableA]
mov dword [esp], str.WINETEST_PLATFORM
test eax, eax
mov eax, str.windows
cmovne eax, edx
mov dword [esp + 4], eax
call ebx
push edi
push edi
mov dword [esp + 4], 0x40b4a2
mov dword [esp], str.WINETEST_DEBUG
call ebx
push eax
push eax
mov dword [esp + 4], 0x40b4b3
mov dword [esp], str.WINETEST_INTERACTIVE
call ebx
push eax
push eax
mov dword [esp + 4], 0x40b4b3
mov dword [esp], str.WINETEST_REPORT_SUCCESS
call ebx
push eax
push eax
jmp 0x407751
mov dword [esp + 4], str.Running_on_win9x_is_not_supported._You_wont_be_able_to_submit_results.
mov dword [esp], 7
call dbg.report
jmp 0x407718
mov edx, dword [ebp - 0x4c]
mov eax, dword [ebp - 0x48]
call dbg.run_tests
mov eax, dword [0x40d2d4]
test eax, eax
je 0x407267
jmp 0x407262
xor eax, eax
call dbg.run_tests
cmp dword [0x40d040], 0
mov ebx, eax
jne 0x407c21
mov eax, dword [0x40d2d4]
cmp eax, 0x32
jg 0x407c36
cmp byte [0x40d2e0], 0
je 0x4079dc
cmp dword [0x40d324], 0xa
jg 0x4079dc
cmp dword [0x40d2d4], 0x32
jg 0x4079dc
mov eax, dword [ebp - 0x2c]
shr eax, 0x1f
or eax, dword [0x40d320]
jne 0x4079dc
mov dword [esp + 8], str.Do_you_want_to_submit_the_test_results_
mov dword [esp + 4], 4
mov dword [esp], 0xa
call dbg.report
cmp eax, 6
jne 0x4079dc
mov dword [esp + 4], ebx
mov eax, dword [ebp - 0x38]
mov dword [esp], eax
call dbg.send_file
test eax, eax
je 0x407c53
xor edi, edi
mov dword [0x40d2d4], edi
jmp 0x4079dc
mov dword [esp + 4], str.You_wont_be_able_to_submit_results_without_a_valid_build_id._nTo_submit_results__winetest_needs_to_be_built_from_a_git_checkout.
mov dword [esp], 7
call dbg.report
jmp 0x4079ac
mov dword [esp + 4], str.Unable_to_create_a_window__the_display_driver_is_not_working.
mov dword [esp], 9
call dbg.report
jmp 0x407867
mov dword [esp + 4], str.WoW64_keys_missing__most_likely_your_WINEPREFIX_wasnt_created_correctly.
mov dword [esp], 9
call dbg.report
jmp 0x4077f9
mov dword [esp + 4], str.Mount_manager_not_running__most_likely_your_WINEPREFIX_wasnt_created_correctly.
mov dword [esp], 9
call dbg.report
jmp 0x4077ec
mov dword [esp], eax
xor ebx, ebx
call dword [sym.imp.kernel32.dll_DeleteFileA]
push ecx
mov dword [esp], ebx
call dword [sym.imp.msvcrt.dll_exit]
mov dword [esp + 8], eax
mov dword [esp + 4], str._d_tests_failed._There_is_probably_something_broken_with_your_setup._nYou_need_to_address_this_before_submitting_results.
mov dword [esp], 7
call dbg.report
jmp 0x407b3b
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_DeleteFileA]
push edx
test eax, eax
jne 0x407bb0
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x34]
mov dword [esp + 4], str.Cant_remove_logfile:__u
mov dword [esp], 7
mov dword [esp + 8], eax
call dbg.report
jmp 0x4079dc
xor ecx, ecx
mov dword [esp + 8], str.ShowCrashDialog
mov dword [esp + 4], ecx
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegDeleteKeyValueA]
sub esp, 0xc
jmp 0x407a4f