Function at 0x420165
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x634
mov eax, dword [0x4c143c]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov ebx, ecx
mov dword [ebp - 0x634], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x630], edi
mov dword [ebp - 0x624], eax
test edi, edi
je 0x420c17
cmp byte [edi], 0
je 0x420c17
push edi
call fcn.00461890
pop ecx
inc eax
call fcn.00459690
mov esi, esp
mov dword [ebp - 0x62c], esi
test esi, esi
je 0x420bf6
push edi
call fcn.00461890
inc eax
push eax
push edi
push esi
call fcn.0045a6d0
push esi
call fcn.00467acc
mov esi, dword [ebx + 0x14]
add esp, 0x14
cmp esi, dword [ebx + 0x18]
je 0x420557
cmp dword [esi + 0x14], 0x10
mov eax, esi
jb 0x4201f4
mov eax, dword [esi]
push eax
call fcn.00465f76
mov dword [ebp - 0x620], eax
pop ecx
test eax, eax
je 0x420bf6
push eax
call fcn.00467acc
push 0x5c
push dword [ebp - 0x620]
call fcn.004662f3
add esp, 0xc
test eax, eax
jne 0x42024d
push 0x5c
push dword [ebp - 0x62c]
call fcn.004662f3
pop ecx
pop ecx
test eax, eax
je 0x42024d
push eax
call fcn.004662b8
push dword [ebp - 0x620]
push eax
call fcn.00467e0f
add esp, 0xc
jmp 0x420260
push dword [ebp - 0x620]
push dword [ebp - 0x62c]
call fcn.00467e0f
pop ecx
pop ecx
mov dword [ebp - 0x628], eax
push dword [ebp - 0x620]
test eax, eax
jne 0x420284
call fcn.0045f1d9
add esi, 0x18
pop ecx
cmp esi, dword [ebx + 0x18]
jne 0x4201ea
jmp 0x42028a
call fcn.0045f1d9
pop ecx
cmp dword [ebp - 0x628], 0
je 0x420557
mov edx, dword [ebx + 0xc]
test edx, edx
je 0x4202fb
cmp dword [0x4c12e0], 0
je 0x4202fb
cmp dword [0x4c3630], 0
je 0x4202fb
cmp dword [ebp - 0x624], 0
mov eax, str.delayed_until_reboot
mov ecx, dword [edx]
mov dword [ebp - 0x628], str.done_immediately
cmove eax, dword [ebp - 0x628]
cmp dword [ebp - 0x634], 0
push eax
mov eax, str.Install
mov dword [ebp - 0x628], str.Uninstall
cmove eax, dword [ebp - 0x628]
push eax
push edi
push str.Trying_to__un_register_module:__s._This_is_a__s._This_is_supposed_to_be__s
push edx
call dword [ecx + 0x10]
add esp, 0x14
push str..dll
push edi
call fcn.00467e0f
pop ecx
pop ecx
test eax, eax
jne 0x420360
push str..ocx
push edi
call fcn.00467e0f
pop ecx
pop ecx
test eax, eax
jne 0x420360
push str..exe
push edi
call fcn.00467e0f
pop ecx
pop ecx
test eax, eax
je 0x420337
and dword [ebp - 0x628], 0
jmp 0x42036a
mov ecx, dword [ebx + 0xc]
test ecx, ecx
je 0x420c34
cmp dword [0x4c12e0], 0
je 0x420c34
mov eax, dword [ecx]
push edi
push str._s_has_none_of_DLL__OCX_or_EXE_extention
push ecx
call dword [eax + 0x18]
jmp 0x420403
mov dword [ebp - 0x628], 1
cmp byte [0x4c3708], 0
jne 0x4203b7
push edi
call fcn.00461890
pop ecx
inc eax
push eax
push edi
push edi
call dword [sym.imp.KERNEL32.dll_GetShortPathNameA]
test eax, eax
jne 0x4203b7
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [ebx + 0xc]
mov esi, eax
test edx, edx
je 0x4203b0
cmp dword [0x4c12e0], 0
je 0x4203b0
push esi
push edi
push str.Unable_to__un_register_module__s___::GetShortPathName___failed._Error:__d
mov ecx, dword [edx]
push edx
call dword [ecx + 0x14]
add esp, 0x10
mov eax, esi
jmp 0x420c37
mov ecx, dword [ebp - 0x634]
test ecx, ecx
je 0x42055e
cmp dword [ebp - 0x624], 0
je 0x42055e
push 0x5c
push edi
call fcn.004662f3
pop ecx
pop ecx
test eax, eax
jne 0x42040b
mov ecx, dword [ebx + 0xc]
test ecx, ecx
je 0x420c34
cmp dword [0x4c12e0], eax
je 0x420c34
mov eax, dword [ecx]
push edi
push str.Unable_to__un_register_module___could_not_extract_file_name_from__s
push ecx
call dword [eax + 0x14]
add esp, 0xc
jmp 0x420c34
cmp dword [ebp - 0x628], 0
lea eax, [ebp - 0x414]
je 0x42043f
push str.regsvr32.exe
push 0x208
push eax
call fcn.00465df5
push edi
lea eax, [ebp - 0x20c]
push str.2__s___s_
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
jmp 0x42045e
push edi
mov edi, 0x208
push edi
push eax
call fcn.00465df5
push str.2__regserver
lea eax, [ebp - 0x20c]
push edi
push eax
call fcn.00465df5
mov ecx, dword [ebx + 0xc]
add esp, 0x18
test ecx, ecx
je 0x420496
cmp dword [0x4c12e0], 0
je 0x420496
cmp dword [0x4c3630], 0
je 0x420496
mov eax, dword [ecx]
lea edx, [ebp - 0x20c]
push edx
lea edx, [ebp - 0x414]
push edx
push str...Running_process__s_with_command_line__s_on_restart
push ecx
call dword [eax + 0x10]
add esp, 0x10
mov ecx, dword [ebx + 0x160]
lea edx, [ebp - 0x20c]
push edx
lea edx, [ebp - 0x414]
push edx
mov eax, dword [ecx]
push dword [ebx + 0x60]
call dword [eax + 4]
mov ecx, dword [ebx + 0xc]
mov edx, eax
test ecx, ecx
je 0x420513
test edx, edx
jne 0x4204ed
cmp dword [0x4c12e0], eax
je 0x420513
cmp dword [0x4c3630], eax
je 0x420513
mov eax, dword [ecx]
lea edx, [ebp - 0x20c]
push edx
lea edx, [ebp - 0x414]
push edx
push str.Successfully_wrote__s___s_to_cleanup.ini
push ecx
call dword [eax + 0x10]
add esp, 0x10
jmp 0x420513
cmp dword [0x4c12e0], 0
je 0x420513
mov eax, dword [ecx]
push edx
lea edx, [ebp - 0x20c]
push edx
lea edx, [ebp - 0x414]
push edx
push str.Could_not_write__s___s_to_cleanup.ini._Error:__d
push ecx
call dword [eax + 0x14]
add esp, 0x14
mov edx, dword [ebx + 0xc]
test edx, edx
je 0x420547
cmp dword [0x4c12e0], 0
je 0x420547
cmp dword [0x4c3630], 0
je 0x420547
cmp dword [esi + 0x14], 0x10
mov eax, dword [edx]
mov edi, dword [eax + 0x10]
mov eax, esi
jb 0x42053b
mov eax, dword [esi]
push eax
push str.Erase__s_from_m_ocxList
push edx
call edi
add esp, 0xc
push esi
lea eax, [ebp - 0x624]
push eax
lea ecx, [ebx + 0x14]
call fcn.004292d8
xor eax, eax
jmp 0x420c37
cmp dword [ebp - 0x628], 0
je 0x420b10
test ecx, ecx
mov edx, str.DllRegisterServer
mov eax, str.DllUnregisterServer
cmovne eax, edx
push eax
lea eax, [ebp - 0x310]
push 0x104
push eax
call fcn.00465df5
push 0
push edi
call fcn.004434b8
add esp, 0x14
mov dword [ebp - 0x624], eax
test eax, eax
jne 0x42082e
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
mov dword [ebp - 0x624], edx
cmp edx, 0xc1
je 0x4205e8
mov ecx, dword [ebx + 0xc]
test ecx, ecx
je 0x4205e1
cmp dword [0x4c12e0], 0
je 0x4205e1
mov eax, dword [ecx]
push edx
push edi
push str.LoadLibrary__s__failed_in__InstallOcx__._Error:__d
push ecx
call dword [eax + 0x14]
add esp, 0x10
mov edx, dword [ebp - 0x624]
mov eax, edx
jmp 0x420c37
and dword [ebp - 0x62c], 0
mov ecx, 0x49908c
cmp dword [ebp - 0x634], 0
mov eax, 0x4b597d
push edi
cmove eax, ecx
mov dword [ebp - 0x628], 1
push eax
lea eax, [ebp - 0x61c]
push str._s__s___s_
push eax
call fcn.004134fa
add esp, 0x10
lea eax, [ebp - 0x108]
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
test eax, eax
jne 0x42066e
and dword [ebp - 0x628], eax
mov eax, dword [ebx + 0xc]
mov dword [ebp - 0x624], eax
test eax, eax
je 0x4206ca
cmp dword [0x4c12e0], 0
je 0x4206ca
mov eax, dword [eax]
mov edi, dword [eax + 0x14]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.GetWindowsDirectory_failed._Using_regsvr32.exe._Error:__d
push dword [ebp - 0x624]
jmp 0x4206bf
push str.Sysnative_regsvr32.exe
lea eax, [ebp - 0x108]
push 0x104
push eax
call fcn.00465e4f
add esp, 0xc
test eax, eax
je 0x4206ca
mov eax, dword [ebx + 0xc]
and dword [ebp - 0x628], 0
mov dword [ebp - 0x624], eax
test eax, eax
je 0x4206ca
cmp dword [0x4c12e0], 0
je 0x4206ca
mov eax, dword [eax]
mov edi, dword [eax + 0x14]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str._tcscat_s_failed._Using_regsvr32.exe._Error:__d
push dword [ebp - 0x624]
call edi
mov edi, dword [ebp - 0x630]
add esp, 0xc
cmp dword [ebp - 0x628], 1
mov ecx, dword [ebx + 0xc]
jne 0x420710
test ecx, ecx
je 0x420708
cmp dword [0x4c12e0], 0
je 0x420708
cmp dword [0x4c3630], 0
je 0x420708
mov eax, dword [ecx]
lea edx, [ebp - 0x61c]
push edx
lea edx, [ebp - 0x108]
push edx
push str.Executing__s_with_command_line__s
push ecx
call dword [eax + 0x10]
add esp, 0x10
lea edx, [ebp - 0x108]
jmp 0x42074c
mov edx, str.regsvr32.exe
test ecx, ecx
je 0x42074c
cmp dword [0x4c12e0], 0
je 0x42074c
cmp dword [0x4c3630], 0
je 0x42074c
mov eax, dword [ecx]
lea edi, [ebp - 0x61c]
push edi
push edx
push str.Executing__s_with_command_line__s
push ecx
call dword [eax + 0x10]
mov edi, dword [ebp - 0x630]
add esp, 0x10
mov edx, str.regsvr32.exe
push 1
lea eax, [ebp - 0x62c]
mov ecx, ebx
push eax
push 1
lea eax, [ebp - 0x61c]
push eax
push edx
call fcn.00417e2f
mov ecx, dword [ebx + 0xc]
mov edx, eax
mov dword [ebp - 0x624], edx
test edx, edx
je 0x4207a6
test ecx, ecx
je 0x4205e1
cmp dword [0x4c12e0], 0
je 0x4205e1
mov eax, dword [ecx]
push edx
lea edx, [ebp - 0x61c]
push edx
push edi
push str.Failed_while_executing__s_with_command_line__s._Error:__d
push ecx
call dword [eax + 0x14]
add esp, 0x14
jmp 0x4205db
mov edx, dword [ebp - 0x62c]
test edx, edx
je 0x4207e6
test ecx, ecx
je 0x4205e1
cmp dword [0x4c12e0], 0
je 0x4205e1
mov eax, dword [ecx]
push edx
lea edx, [ebp - 0x61c]
push edx
push str.There_was_an_error_in_the_call_when_executing_regsvr32.exe_with_command_line__s._Error:__d
push ecx
call dword [eax + 0x14]
mov edx, dword [ebp - 0x62c]
add esp, 0x10
jmp 0x4205e1
test ecx, ecx
je 0x420817
cmp dword [0x4c12e0], 0
je 0x420817
cmp dword [0x4c3630], 0
je 0x420817
cmp dword [esi + 0x14], 0x10
mov eax, dword [ecx]
mov edx, dword [eax + 0x10]
mov eax, esi
jb 0x42080b
mov eax, dword [esi]
push eax
push str.Execution_was_successful._Erasing__s_from_m_ocxList
push ecx
call edx
add esp, 0xc
push esi
lea eax, [ebp - 0x624]
push eax
lea ecx, [ebx + 0x14]
call fcn.004292d8
xor edx, edx
jmp 0x4205e1
mov ecx, dword [ebx + 0xc]
test ecx, ecx
je 0x42085c
cmp dword [0x4c12e0], 0
je 0x42085c
cmp dword [0x4c3630], 0
je 0x42085c
mov eax, dword [ecx]
push edi
push str.Successfully_loaded_library__s
push ecx
call dword [eax + 0x10]
mov eax, dword [ebp - 0x624]
add esp, 0xc
lea ecx, [ebp - 0x310]
mov dword [ebp - 0x620], 0x80004005
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x630], eax
test eax, eax
je 0x4208c8
push 0
call dword [sym.imp.ole32.dll_CoInitialize]
mov ecx, dword [ebx + 0xc]
test ecx, ecx
je 0x4208b4
cmp dword [0x4c12e0], 0
je 0x4208b4
cmp dword [0x4c3630], 0
je 0x4208b4
mov eax, dword [ecx]
lea edx, [ebp - 0x310]
push edx
push str.Successfully_got_procedure__s_address._Calling_this_function
push ecx
call dword [eax + 0x10]
add esp, 0xc
call dword [ebp - 0x630]
mov dword [ebp - 0x620], eax
call dword [sym.imp.ole32.dll_CoUninitialize]
jmp 0x4208f5
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [ebx + 0xc]
test edx, edx
je 0x4208f5
cmp dword [0x4c12e0], 0
je 0x4208f5
mov ecx, dword [edx]
push eax
push edi
lea eax, [ebp - 0x310]
push eax
push str.Could_not_get_procedure__s_address_in_module__s._Error:__d
push edx
call dword [ecx + 0x14]
add esp, 0x14
push dword [ebp - 0x624]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
test eax, eax
jne 0x420923
mov ecx, dword [ebx + 0xc]
test ecx, ecx
je 0x420923
cmp dword [0x4c12e0], eax
je 0x420923
mov eax, dword [ecx]
push edi
push str.Failed_to_free_library:__s._Possible_resource_leak.
push ecx
call dword [eax + 0x18]
add esp, 0xc
cmp dword [ebp - 0x634], 0
mov edx, dword [ebp - 0x620]
jne 0x420a9c
cmp edx, 0x80040153
jne 0x420a9c
mov ecx, dword [ebx + 0xc]
test ecx, ecx
je 0x420961
cmp dword [0x4c12e0], 0
je 0x420961
mov eax, dword [ecx]
push edx
push str.There_was_an_error_in_the_call._Error:__x._Trying_again_with_long_path
push ecx
call dword [eax + 0x18]
add esp, 0xc
push 0
push edi
call fcn.004434b8
mov dword [ebp - 0x624], eax
pop ecx
pop ecx
test eax, eax
jne 0x4209a1
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [ebx + 0xc]
mov esi, eax
test edx, edx
je 0x4203b0
cmp dword [0x4c12e0], 0
je 0x4203b0
push esi
push edi
push str.LoadLibrary__s__failed_for_unregistration._Error:__d
jmp 0x4203a7
mov ecx, dword [ebx + 0xc]
test ecx, ecx
je 0x4209cf
cmp dword [0x4c12e0], 0
je 0x4209cf
cmp dword [0x4c3630], 0
je 0x4209cf
mov eax, dword [ecx]
push edi
push str.Successfully_loaded_library__s
push ecx
call dword [eax + 0x10]
mov eax, dword [ebp - 0x624]
add esp, 0xc
lea ecx, [ebp - 0x310]
mov dword [ebp - 0x620], 0x80004005
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x630], eax
test eax, eax
je 0x420a3b
push 0
call dword [sym.imp.ole32.dll_CoInitialize]
mov ecx, dword [ebx + 0xc]
test ecx, ecx
je 0x420a27
cmp dword [0x4c12e0], 0
je 0x420a27
cmp dword [0x4c3630], 0
je 0x420a27
mov eax, dword [ecx]
lea edx, [ebp - 0x310]
push edx
push str.Successfully_got_procedure__s_address._Calling_this_function
push ecx
call dword [eax + 0x10]
add esp, 0xc
call dword [ebp - 0x630]
mov dword [ebp - 0x620], eax
call dword [sym.imp.ole32.dll_CoUninitialize]
jmp 0x420a68
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [ebx + 0xc]
test edx, edx
je 0x420a68
cmp dword [0x4c12e0], 0
je 0x420a68
mov ecx, dword [edx]
push eax
push edi
lea eax, [ebp - 0x310]
push eax
push str.Could_not_get_procedure__s_address_for_module__s._Error:__d
push edx
call dword [ecx + 0x14]
add esp, 0x14
push dword [ebp - 0x624]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
test eax, eax
jne 0x420a96
mov ecx, dword [ebx + 0xc]
test ecx, ecx
je 0x420a96
cmp dword [0x4c12e0], eax
je 0x420a96
mov eax, dword [ecx]
push edi
push str.Failed_to_free_library:__s._Possible_resource_leak.
push ecx
call dword [eax + 0x18]
add esp, 0xc
mov edx, dword [ebp - 0x620]
mov ecx, dword [ebx + 0xc]
test edx, edx
jns 0x420acd
test ecx, ecx
je 0x420bee
cmp dword [0x4c12e0], 0
je 0x420bee
mov eax, dword [ecx]
push edx
push edi
push str.There_was_an_error_when_trying_to__un_register_module__s._Error:__x
push ecx
call dword [eax + 0x14]
add esp, 0x10
jmp 0x420bee
and dword [ebp - 0x620], 0
test ecx, ecx
je 0x420bde
cmp dword [0x4c12e0], 0
je 0x420bde
cmp dword [0x4c3630], 0
je 0x420bde
cmp dword [esi + 0x14], 0x10
mov eax, dword [ecx]
mov edx, dword [eax + 0x10]
mov eax, esi
jb 0x420b05
mov eax, dword [esi]
push eax
push str.Registration_was_successful._Erase__s_from_m_ocxList
jmp 0x420bd8
test ecx, ecx
mov edx, str._regserver
mov eax, str._unregserver
cmovne eax, edx
push eax
lea eax, [ebp - 0x108]
push 0x104
push eax
call fcn.00465df5
mov ecx, dword [ebx + 0xc]
add esp, 0xc
test ecx, ecx
je 0x420b63
cmp dword [0x4c12e0], 0
je 0x420b63
cmp dword [0x4c3630], 0
je 0x420b63
mov eax, dword [ecx]
lea edx, [ebp - 0x108]
push edx
push edi
push str.Executing__s_with_command_line__s
push ecx
call dword [eax + 0x10]
add esp, 0x10
push 0
push 0
push 1
lea eax, [ebp - 0x108]
mov ecx, ebx
push eax
push edi
call fcn.00417e2f
mov ecx, dword [ebx + 0xc]
mov edx, eax
mov dword [ebp - 0x620], eax
test edx, edx
je 0x420bad
test ecx, ecx
je 0x420bee
cmp dword [0x4c12e0], 0
je 0x420bee
mov eax, dword [ecx]
push edx
lea edx, [ebp - 0x108]
push edx
push edi
push str.Failed_while_executing__s_with_parameter__s._Error:__d
push ecx
call dword [eax + 0x14]
add esp, 0x14
jmp 0x420bee
test ecx, ecx
je 0x420bde
cmp dword [0x4c12e0], 0
je 0x420bde
cmp dword [0x4c3630], 0
je 0x420bde
cmp dword [esi + 0x14], 0x10
mov eax, dword [ecx]
mov edx, dword [eax + 0x10]
mov eax, esi
jb 0x420bd2
mov eax, dword [esi]
push eax
push str.Execution_was_successful._Erasing__s_from_m_ocxList
push ecx
call edx
add esp, 0xc
push esi
lea eax, [ebp - 0x624]
push eax
lea ecx, [ebx + 0x14]
call fcn.004292d8
mov eax, dword [ebp - 0x620]
jmp 0x420c37
mov ecx, dword [ebx + 0xc]
test ecx, ecx
je 0x420c13
cmp dword [0x4c12e0], 0
je 0x420c13
mov eax, dword [ecx]
push str.FATAL._Not_enough_memory
push ecx
call dword [eax + 0x1c]
pop ecx
pop ecx
push 8
jmp 0x420c36
mov ecx, dword [ebx + 0xc]
test ecx, ecx
je 0x420c34
cmp dword [0x4c12e0], 0
je 0x420c34
mov eax, dword [ecx]
push str.Parameters_to_CInfFile::_InstallOcx___are_incorrect
push ecx
call dword [eax + 0x14]
pop ecx
pop ecx
push 0x57
pop eax
lea esp, [ebp - 0x640]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00458eeb
leave
ret 0xc