Function at 0x404950
Capabilities:
Delete file
Get file version info
Query or enumerate registry value
Set environment variable

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x578
mov eax, dword [0x40d040]
mov esi, dword [ebp + 0x10]
test eax, eax
je 0x404980
lea esp, [ebp - 0xc]
mov eax, 1
pop ebx
pop esi
pop edi
pop ebp
ret 0x10
mov dword [esp], esi
lea edi, [ebp - 0x520]
call dword [sym.imp.user32.dll_CharLowerA]
mov ebx, dword [sym.imp.msvcrt.dll_strcpy]
sub esp, 4
mov dword [esp + 4], esi
mov dword [esp], edi
call ebx
mov eax, dword [sym.imp.msvcrt.dll_strstr]
mov dword [esp + 4], str._test.exe
mov dword [esp], edi
mov dword [ebp - 0x538], eax
call eax
xor edx, edx
mov byte [eax], 0
mov eax, esi
call dbg.test_filtered_out
test eax, eax
je 0x4049f0
mov eax, dword [0x40d2c0]
add dword [0x40d324], 1
test eax, eax
je 0x404968
mov dword [esp + 4], edi
mov dword [esp], str._____sskipped_n
call dbg.xprintf
jmp 0x404968
mov eax, dword [0x40d32c]
mov ecx, esi
lea edx, [eax + eax*4]
mov eax, dword [0x40d330]
lea eax, [eax + edx*4]
mov edx, dword [ebp + 0x14]
call dbg.extract_test
mov edx, dword [0x40d2b4]
mov dword [ebp - 0x544], 0xffffffff
test edx, edx
je 0x404af0
mov eax, dword [0x40d2b0]
test eax, eax
je 0x404af0
mov esi, dword [0x40d2ac]
test esi, esi
je 0x404af0
mov ecx, dword [0x40d2a8]
test ecx, ecx
je 0x404af0
mov eax, dword [0x40d330]
mov esi, dword [0x40d32c]
xor ecx, ecx
mov dword [ebp - 0x53c], eax
xor eax, eax
mov dword [ebp + eax - 0x20c], ecx
add eax, 4
cmp eax, 0x18
jb 0x404a60
mov ecx, dword [ebp - 0x53c]
lea eax, [esi + esi*4]
mov dword [ebp - 0x214], 0x20
mov dword [ebp - 0x210], 8
mov eax, dword [ecx + eax*4 + 0xc]
mov dword [ebp - 0x200], 1
mov dword [ebp - 0x20c], eax
lea eax, [ebp - 0x214]
mov dword [esp], eax
call edx
mov dword [ebp - 0x544], eax
sub esp, 4
mov esi, eax
cmp eax, 0xffffffff
je 0x404ae1
lea eax, [ebp - 0x530]
mov dword [esp], esi
mov dword [esp + 4], eax
call dword [0x40d2b0]
sub esp, 8
test eax, eax
jne 0x404af0
mov dword [esp], esi
call dword [0x40d2a8]
sub esp, 4
mov dword [ebp - 0x544], 0xffffffff
lea esi, [esi]
nop
mov eax, dword [0x40d32c]
mov edx, dword [0x40d330]
lea eax, [eax + eax*4]
lea eax, [edx + eax*4]
mov dword [eax + 0x10], 0
lea eax, [ebp - 0x41c]
mov dword [esp + 4], edi
mov dword [esp], eax
call ebx
mov eax, dword [sym.imp.kernel32.dll_LoadLibraryExA]
mov dword [esp + 8], 2
mov dword [esp + 4], 0
mov dword [esp], edi
mov dword [ebp - 0x540], eax
call eax
mov esi, dword [sym.imp.kernel32.dll_FreeLibrary]
lea edx, [ebp - 0x528]
mov dword [ebp - 0x534], eax
sub esp, 0xc
test eax, eax
je 0x404f48
mov dword [esp + 4], edx
mov dword [esp], edi
call dword [sym.imp.version.dll_GetFileVersionInfoSizeA]
mov dword [ebp - 0x52c], eax
sub esp, 8
test eax, eax
jne 0x404e90
mov ebx, dword [ebp - 0x534]
mov dword [esp], str.ntdll.dll
call dword [sym.imp.kernel32.dll_GetModuleHandleA]
sub esp, 4
test eax, eax
je 0x404c78
mov dword [esp + 4], str.wine_server_call
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_GetProcAddress]
sub esp, 8
test eax, eax
je 0x404c78
test bl, 1
je 0x404c78
cmp word [ebx - 1], 0x5a4d
jne 0x404c78
cmp dword [ebx + 0x3b], 0x5f
jbe 0x404c06
add ebx, 0x3f
mov dword [esp + 8], 0x11
mov dword [esp + 4], str.Wine_builtin_DLL
mov dword [esp], ebx
call sym._memcmp
test eax, eax
je 0x404c78
mov dword [esp + 8], 0x15
mov dword [esp + 4], str.Wine_placeholder_DLL
mov dword [esp], ebx
call sym._memcmp
test eax, eax
je 0x404c78
mov dword [esp + 4], edi
mov dword [esp], str._____sdll_is_native_n
call dbg.xprintf
mov eax, dword [ebp - 0x534]
add dword [0x40d320], 1
mov dword [esp], eax
call esi
sub esp, 4
lea esi, [esi]
nop
mov edi, dword [ebp - 0x544]
cmp edi, 0xffffffff
je 0x404968
mov eax, dword [ebp - 0x530]
mov dword [esp], 0
mov dword [esp + 4], eax
call dword [0x40d2ac]
sub esp, 8
mov dword [esp], edi
call dword [0x40d2a8]
mov eax, 1
sub esp, 4
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret 0x10
mov eax, dword [ebp - 0x534]
mov dword [esp], eax
call esi
lea eax, [ebp - 0x318]
mov dword [ebp - 0x53c], eax
sub esp, 4
mov eax, dword [0x40d32c]
lea edx, [eax + eax*4]
mov eax, dword [0x40d330]
lea esi, [eax + edx*4]
mov eax, dword [ebp - 0x53c]
mov dword [esi + 4], 0
call dbg.create_temp_file
mov dword [ebp - 0x540], eax
cmp eax, 0xffffffff
je 0x4050e0
mov eax, dword [esi + 0xc]
mov dword [esp + 4], str._s___list
mov dword [esp], 0
mov dword [esp + 8], eax
call dbg.strmake
mov dword [ebp - 0x548], eax
mov eax, dword [esi + 0x10]
test eax, eax
je 0x404d2b
mov dword [esp + 0xc], eax
mov eax, dword [0x40d2a4]
mov dword [esp + 4], 0x40af63
mov dword [esp + 8], eax
mov dword [esp], 0
call dbg.strmake
mov dword [esp], str.PATH
mov ebx, eax
mov dword [esp + 4], eax
call dword [sym.imp.kernel32.dll_SetEnvironmentVariableA]
sub esp, 8
mov dword [esp], ebx
call dword [sym.imp.msvcrt.dll_free]
mov dword [esp + 8], 0
mov dword [esp + 4], 1
mov dword [esp], 0x1388
mov ecx, dword [ebp + 0x14]
mov edx, dword [ebp - 0x540]
mov eax, dword [ebp - 0x548]
call dbg.run_ex
mov dword [ebp - 0x54c], eax
mov eax, dword fs:[0x18]
mov ebx, dword [eax + 0x34]
mov eax, dword [esi + 0x10]
test eax, eax
je 0x404d85
mov eax, dword [0x40d2a4]
mov dword [esp], str.PATH
mov dword [esp + 4], eax
call dword [sym.imp.kernel32.dll_SetEnvironmentVariableA]
sub esp, 8
mov eax, dword [ebp - 0x548]
mov dword [esp], eax
call dword [sym.imp.msvcrt.dll_free]
mov eax, dword [ebp - 0x54c]
test eax, eax
jne 0x405168
mov edx, dword [ebp - 0x540]
mov eax, dword [ebp - 0x53c]
lea ecx, [ebp - 0x524]
call dbg.flush_temp_file
mov dword [ebp - 0x548], eax
mov dword [esp + 4], str.Valid_test_names:
mov dword [esp], eax
mov eax, dword [ebp - 0x538]
call eax
test eax, eax
je 0x40537f
mov dword [esp], 0x28
lea ebx, [eax + 0x12]
call sym._xalloc
mov dword [esi + 8], eax
mov eax, dword [sym.imp.msvcrt.dll_strtok]
mov dword [esp], ebx
mov dword [esp + 4], str.__t_r_n
mov dword [ebp - 0x540], eax
call eax
mov dword [ebp - 0x53c], 0xa
mov ebx, eax
test eax, eax
jne 0x404e5c
jmp 0x404ed8
lea ecx, [eax + 1]
lea edx, [edx + eax*4]
mov dword [esi + 4], ecx
mov dword [ebp - 0x538], edx
mov dword [esp], ebx
call dbg.xstrdup
mov edx, dword [ebp - 0x538]
mov dword [edx], eax
mov dword [esp + 4], str.__t_r_n
mov dword [esp], 0
mov eax, dword [ebp - 0x540]
call eax
mov ebx, eax
test eax, eax
je 0x404ed8
mov eax, dword [esi + 4]
mov edx, dword [esi + 8]
cmp dword [ebp - 0x53c], eax
jne 0x404e20
shl dword [ebp - 0x53c], 1
mov eax, dword [ebp - 0x53c]
mov dword [esp], edx
shl eax, 2
mov dword [esp + 4], eax
call sym._xrealloc
mov dword [esi + 8], eax
mov edx, eax
mov eax, dword [esi + 4]
jmp 0x404e20
mov dword [esp], eax
call sym._xalloc
mov dword [esp + 0xc], eax
mov ebx, eax
mov eax, dword [ebp - 0x52c]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x528]
mov dword [esp], edi
mov dword [esp + 4], eax
call dword [sym.imp.version.dll_GetFileVersionInfoA]
sub esp, 0x10
test eax, eax
jne 0x4052b8
mov dword [esp], ebx
call dword [sym.imp.msvcrt.dll_free]
jmp 0x404b72
mov eax, dword [esi + 4]
shl eax, 2
mov dword [esp + 4], eax
mov eax, dword [esi + 8]
mov dword [esp], eax
call sym._xrealloc
mov dword [esi + 8], eax
mov eax, dword [ebp - 0x548]
mov dword [esp], eax
call dword [sym.imp.msvcrt.dll_free]
lea eax, [ebp - 0x41c]
call dbg.get_file_version
mov dword [esp + 4], edi
mov dword [esp + 8], eax
mov dword [esp], str._____s_s_n
call dbg.xprintf
mov eax, dword [0x40d32c]
mov ecx, dword [0x40d330]
lea edx, [eax + eax*4]
add eax, 1
lea edx, [ecx + edx*4]
mov dword [0x40d32c], eax
mov edx, dword [edx + 4]
add dword [0x40d328], edx
jmp 0x404c30
mov eax, dword [0x40d330]
mov dword [ebp - 0x53c], edx
mov esi, dword [0x40d32c]
mov dword [ebp - 0x54c], eax
mov dword [esp + 4], str.oledb32
mov dword [esp], edi
call dword [sym.imp.msvcrt.dll__stricmp]
mov edx, dword [ebp - 0x53c]
test eax, eax
je 0x4051b0
lea eax, [ebp - 0x318]
mov dword [ebp - 0x53c], eax
mov dword [ebp - 0x534], 0
mov eax, dword [0x40d2b8]
test eax, eax
je 0x404c92
lea esi, [ebp - 0x214]
mov dword [esp + 0x14], 0x104
mov dword [esp + 0x10], esi
mov dword [esp + 0xc], 0xffffffff
mov dword [esp + 8], edi
mov dword [esp + 4], 0
mov dword [esp], 0
call dword [sym.imp.kernel32.dll_MultiByteToWideChar]
lea eax, [ebp - 0x534]
sub esp, 0x18
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], esi
call dword [0x40d2b8]
sub esp, 0x10
test eax, eax
js 0x405370
mov eax, dword [ebp - 0x534]
test eax, eax
je 0x405370
mov edx, dword [0x40d330]
mov esi, dword [0x40d32c]
mov dword [ebp - 0x548], edx
mov dword [esp + 8], 0x104
mov ecx, dword [ebp - 0x53c]
mov dword [esp], eax
mov dword [esp + 4], ecx
call dword [sym.imp.kernel32.dll_GetModuleFileNameA]
mov ecx, dword [ebp - 0x53c]
lea eax, [ebp - 0x41c]
sub esp, 0xc
mov dword [esp + 4], ecx
mov dword [esp], eax
call ebx
mov dword [esp + 4], 0x5c
mov ebx, dword [ebp - 0x53c]
mov dword [esp], ebx
call dword [sym.imp.msvcrt.dll_strrchr]
mov byte [eax], 0
mov dword [esp], ebx
call dbg.xstrdup
mov edx, dword [ebp - 0x548]
lea ecx, [esi + esi*4]
mov esi, dword [sym.imp.kernel32.dll_FreeLibrary]
mov dword [edx + ecx*4 + 0x10], eax
mov eax, dword [ebp - 0x534]
mov dword [esp], eax
call esi
lea eax, [ebp - 0x41c]
sub esp, 4
mov dword [esp + 8], 2
mov dword [esp + 4], 0
mov dword [esp], eax
mov eax, dword [ebp - 0x540]
call eax
mov dword [ebp - 0x534], eax
sub esp, 0xc
test eax, eax
je 0x404c92
lea edx, [ebp - 0x528]
jmp 0x404b54
mov eax, dword fs:[0x18]
mov ebx, dword [eax + 0x34]
cmp ebx, 0xc0000135
je 0x4053e8
jbe 0x405138
cmp ebx, 0xc0000138
je 0x4053c0
cmp ebx, 0xc0000139
jne 0x40539e
lea eax, [ebp - 0x41c]
call dbg.get_file_version
mov dword [esp + 4], edi
mov dword [esp + 8], eax
mov dword [esp], str._____sdll_is_missing_an_entrypoint___s__n
call dbg.xprintf
jmp 0x404c30
test ebx, ebx
je 0x404eff
cmp ebx, 0x36b1
jne 0x40539e
mov dword [esp + 4], edi
mov dword [esp], str._____sdll_is_missing_the_requested_side_by_side_version_n
call dbg.xprintf
jmp 0x404c30
mov eax, dword [ebp - 0x540]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_CloseHandle]
mov eax, dword [ebp - 0x53c]
sub esp, 4
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_DeleteFileA]
mov eax, dword [ebp - 0x54c]
sub esp, 4
cmp eax, 0xfffffffe
je 0x4050e9
mov ebx, eax
cmp eax, 0xc0000135
je 0x4053e8
ja 0x4050f7
jmp 0x405140
lea eax, [ebp - 0x318]
mov dword [ebp - 0x548], edx
mov dword [esp + 0x30], 0x3d
mov dword [esp + 0x2c], 0x77
mov dword [esp + 0x28], 0x44
mov dword [esp + 0x24], 0
mov dword [esp + 0x20], 0xaa
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0xe5
mov dword [esp + 0x14], 0xad
mov dword [esp + 0x10], 0x11ce
mov dword [esp + 0xc], 0x5cf3
mov dword [esp + 8], 0xc8b522d1
mov dword [esp + 4], str.CLSID_08lx__04x__04x__02x_2x__02x_2x_02x_2x_02x_2xInprocServer32
mov dword [ebp - 0x53c], eax
mov dword [esp], eax
call dbg.sprintf
mov edx, dword [ebp - 0x548]
mov dword [esp + 8], edx
mov eax, dword [ebp - 0x53c]
mov dword [esp], 0x80000000
mov dword [esp + 4], eax
call dword [sym.imp.advapi32.dll_RegOpenKeyA]
sub esp, 0xc
test eax, eax
jne 0x404f8a
mov dword [ebp - 0x524], 0x104
lea eax, [ebp - 0x524]
mov dword [esp + 0xc], eax
lea eax, [ebp - 0x214]
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov eax, dword [ebp - 0x528]
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegQueryValueA]
mov edx, dword [ebp - 0x548]
sub esp, 0x10
test eax, eax
je 0x4053fd
mov eax, dword [ebp - 0x528]
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegCloseKey]
sub esp, 4
jmp 0x404f8a
lea eax, [ebp - 0x318]
mov dword [esp + 0xc], 0x4b0
mov dword [esp + 8], 0x409
mov dword [esp + 4], str.StringFileInfo_04x_04xOriginalFilename
mov dword [ebp - 0x53c], eax
mov dword [esp], eax
call dbg.sprintf
lea eax, [ebp - 0x52c]
mov dword [esp + 0xc], eax
lea eax, [ebp - 0x524]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x53c]
mov dword [esp], ebx
mov dword [esp + 4], eax
call dword [sym.imp.version.dll_VerQueryValueA]
sub esp, 0x10
test eax, eax
je 0x404ec6
mov eax, dword [ebp - 0x524]
mov dword [esp], str.wcodstub.dll
mov dword [esp + 4], eax
call dword [sym.imp.kernel32.dll_lstrcmpiA]
sub esp, 8
mov dword [ebp - 0x53c], eax
mov dword [esp], ebx
call dword [sym.imp.msvcrt.dll_free]
mov eax, dword [ebp - 0x53c]
test eax, eax
jne 0x404b72
mov dword [esp + 4], edi
mov dword [esp], str._____sdll_is_a_stub_n
call dbg.xprintf
mov eax, dword [ebp - 0x534]
mov dword [esp], eax
call esi
sub esp, 4
jmp 0x404c30
mov dword [ebp - 0x534], 0
jmp 0x404c92
mov eax, dword [esi]
mov dword [esp + 4], str.Cant_parse_subtests_output_of__s
mov ebx, 0x54f
mov dword [esp], 8
mov dword [esp + 8], eax
call dbg.report
mov dword [esp + 8], ebx
mov dword [esp + 4], edi
mov dword [esp], str._____sload_error__u_n
call dbg.xprintf
jmp 0x404c30
lea eax, [ebp - 0x41c]
call dbg.get_file_version
mov dword [esp + 4], edi
mov dword [esp + 8], eax
mov dword [esp], str._____sdll_is_missing_an_ordinal___s__n
call dbg.xprintf
jmp 0x404c30
mov dword [esp + 4], edi
mov dword [esp], str._____sdll_is_missing_n
call dbg.xprintf
jmp 0x404c30
lea eax, [ebp - 0x214]
mov dword [ebp - 0x550], edx
mov dword [esp + 8], 2
mov dword [esp + 4], 0
mov dword [esp], eax
mov eax, dword [ebp - 0x540]
call eax
mov dword [ebp - 0x548], eax
sub esp, 0xc
test eax, eax
je 0x40529c
lea eax, [ebp - 0x214]
mov dword [esp + 4], eax
lea eax, [ebp - 0x41c]
mov dword [esp], eax
call ebx
lea eax, [ebp - 0x214]
mov dword [esp + 4], 0x5c
mov dword [esp], eax
call dword [sym.imp.msvcrt.dll_strrchr]
mov edx, dword [ebp - 0x550]
test eax, eax
je 0x40546e
mov byte [eax], 0
lea eax, [ebp - 0x214]
mov dword [ebp - 0x53c], edx
mov dword [esp], eax
call dbg.xstrdup
mov ebx, dword [ebp - 0x54c]
mov ecx, eax
lea eax, [esi + esi*4]
mov dword [ebx + eax*4 + 0x10], ecx
mov eax, dword [ebp - 0x528]
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegCloseKey]
mov eax, dword [ebp - 0x548]
mov esi, dword [sym.imp.kernel32.dll_FreeLibrary]
mov edx, dword [ebp - 0x53c]
sub esp, 4
mov dword [ebp - 0x534], eax
jmp 0x404b54