Function at 0x4517f5
Capabilities:
Accept command line arguments
Get common file path
Print debug messages
Set current directory

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xb44
mov eax, dword [0x475078]
xor eax, esp
mov dword [esp + 0xb40], eax
push ebx
push esi
push edi
lea eax, [esp + 0x140]
xor ebx, ebx
push eax
push 0x104
mov dword [esp + 0x30], ebx
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
push 7
lea eax, [esp + 0x34]
xor esi, esi
pop edi
mov dword [esp + 0x2c], eax
lea ecx, [esp + 0x2c]
xor eax, eax
mov dword [esp + 0x44], edi
push esi
mov dword [esp + 0x44], esi
mov word [esp + 0x34], ax
call fcn.00403e12
lea ecx, [esp + 0x2c]
call fcn.004019db
mov eax, dword [esp + 0x2c]
cmp dword [eax + 0x14], 8
jb 0x451866
mov eax, dword [eax]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
push esi
push 1
lea ecx, [esp + 0x38]
call fcn.004016ce
push esi
call dword [sym.imp.ole32.dll_CoInitialize]
mov esi, eax
xor eax, eax
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], eax
lea eax, [esp + 0x14]
push eax
mov dword [esp + 0x2c], esi
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
push eax
call dword [sym.imp.SHELL32.dll_CommandLineToArgvW]
lea ecx, [esp + 0x14]
mov dword [esp + 0x1c], eax
mov dword [esp + 0x18], eax
call fcn.00407882
call fcn.0040446c
mov ecx, eax
call fcn.00450a80
test eax, eax
jne 0x4518ce
xor ebx, ebx
jmp 0x451f4e
and dword [esp + 0x74], ebx
lea eax, [esp + 0x64]
mov dword [esp + 0x60], eax
xor eax, eax
cmp dword [esp + 0x14], 1
mov dword [esp + 0x78], edi
mov word [esp + 0x64], ax
jle 0x451937
and dword [esp + 0x58], eax
mov dword [esp + 0x5c], edi
mov edi, 0x4669d0
push edi
mov word [esp + 0x4c], ax
call fcn.004293b5
pop ecx
push eax
push edi
lea ecx, [esp + 0x50]
call fcn.00401419
push 3
pop ebx
push 0
lea eax, [esp + 0x30]
push eax
lea ecx, [esp + 0x1c]
call fcn.00407798
lea edx, [esp + 0x48]
mov ecx, eax
call fcn.004056b5
mov byte [esp + 0xf], 1
test al, al
jne 0x45193c
mov byte [esp + 0xf], 0
test bl, 2
je 0x451951
push 0
push 1
lea ecx, [esp + 0x34]
and ebx, 0xfffffffd
call fcn.004016ce
test bl, 1
je 0x451966
xor ebx, ebx
lea ecx, [esp + 0x48]
push ebx
push 1
call fcn.004016ce
jmp 0x451968
xor ebx, ebx
cmp byte [esp + 0xf], 0
je 0x451ec1
push 1
lea eax, [esp + 0x30]
push eax
lea ecx, [esp + 0x1c]
call fcn.00407798
lea ecx, [esp + 0x128]
push eax
mov dword [esp + 0x128], ecx
call fcn.00401b05
push dword [esp + 0x124]
mov ecx, dword [esp + 0x64]
call fcn.004044b9
push ebx
push 1
lea ecx, [esp + 0x130]
call fcn.004016ce
push ebx
push 1
lea ecx, [esp + 0x34]
call fcn.004016ce
mov eax, dword [esp + 0x60]
cmp dword [eax + 0x14], 8
jb 0x4519ce
mov eax, dword [eax]
push eax
call dword [sym.imp.SHLWAPI.dll_PathUnquoteSpacesW]
mov ecx, dword [esp + 0x60]
call fcn.00401b2d
mov ecx, dword [esp + 0x60]
cmp dword [ecx + 0x14], 8
jb 0x4519ea
mov ecx, dword [ecx]
call fcn.0045107b
test al, al
jne 0x4519fb
xor ebx, ebx
inc ebx
jmp 0x451f41
call fcn.0040446c
mov ecx, eax
call fcn.00450a61
mov ebx, eax
mov edx, str.global_app_id
mov ecx, ebx
call fcn.0040a72d
push 0
or edx, 0xffffffff
mov ecx, ebx
call fcn.0040a3f4
add dword [ebx + 0xc], 0xfffffff0
mov edi, eax
pop ecx
mov edx, str.global_uinstall_mutex_guid
mov dword [esp + 0x10], edi
mov ecx, ebx
call fcn.0040a72d
push 0xffffffffffffffff
mov edx, ebx
lea ecx, [esp + 0xc8]
call fcn.00406c46
add dword [ebx + 0xc], 0xfffffff0
mov edx, str.global_install_mutex_guid
pop ecx
mov ecx, ebx
call fcn.0040a72d
push 0xffffffffffffffff
mov edx, ebx
lea ecx, [esp + 0xb0]
call fcn.00406c46
add dword [ebx + 0xc], 0xfffffff0
cmp dword [esp + 0xd8], 0
pop ecx
jne 0x451a97
push str.GlobalFE1A11F2_E01F_4421_90FD_2409A1BA5EFD
call fcn.004293b5
pop ecx
push eax
push str.GlobalFE1A11F2_E01F_4421_90FD_2409A1BA5EFD
lea ecx, [esp + 0xcc]
call fcn.00401419
jmp 0x451a99
xor edi, edi
and dword [esp + 0x24], 0
lea eax, [esp + 0xc4]
cmp dword [esp + 0xd8], 8
lea ecx, [esp + 0x24]
push edi
cmovae eax, dword [esp + 0xc8]
push str.SMG_Uninstaller
push eax
call fcn.0040794a
test eax, eax
je 0x451e93
cmp dword [esp + 0xbc], 0
jne 0x451af3
mov edi, str.GlobalA043B702_166A_4FB8_9733_E2BC4713F36F
push edi
call fcn.004293b5
pop ecx
push eax
push edi
lea ecx, [esp + 0xb4]
call fcn.00401419
jmp 0x451af8
and dword [esp + 0x10], 0
and dword [esp + 0x20], 0
lea eax, [esp + 0xac]
push dword [esp + 0x10]
cmp dword [esp + 0xc4], 8
lea ecx, [esp + 0x24]
push str.SMG_Installer
cmovae eax, dword [esp + 0xb4]
push eax
call fcn.0040794a
test eax, eax
jne 0x451b78
push 0x466b28
mov edx, str.global_uninst_wait_for_inst_exit
lea ecx, [esp + 0x4c]
call fcn.00450fc9
cmp dword [esp + 0x60], 8
lea eax, [esp + 0x4c]
mov dword [esp], 0x10000
cmovae eax, dword [esp + 0x4c]
xor ebx, ebx
push ebx
push eax
push ebx
call dword [sym.imp.USER32.dll_MessageBoxW]
push ebx
push 1
lea ecx, [esp + 0x50]
call fcn.004016ce
lea ecx, [esp + 0x20]
call fcn.00403ed7
jmp 0x451e95
lea ecx, [esp + 0x20]
call fcn.00403ed7
mov edx, dword [esp + 0x60]
mov ecx, ebx
call fcn.00406940
mov edx, str.global_install_path
mov ecx, ebx
call fcn.0040aa53
mov esi, str.hwang
lea edi, [esp + 0x348]
push 0x7f2
lea eax, [esp + 0x35a]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
xor esi, esi
push esi
push eax
call fcn.004262f0
mov eax, dword [esp + 0x6c]
add esp, 0xc
cmp dword [eax + 0x14], 8
jb 0x451bcd
mov eax, dword [eax]
push eax
lea eax, [esp + 0x358]
push eax
call fcn.00406ba3
pop ecx
pop ecx
lea eax, [esp + 0x348]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov edx, str.DTLSE_BeforeInit
mov ecx, ebx
call fcn.0040a72d
or edi, 0xffffffff
mov ecx, ebx
mov edx, edi
call fcn.0040a2be
cmp eax, 6
jne 0x451c17
call fcn.0040446c
push esi
push esi
push ebx
call fcn.00450428
jmp 0x451c1b
add dword [ebx + 0xc], 0xfffffff0
mov edx, str.global_product_name
mov ecx, ebx
call fcn.0040a72d
push edi
mov edx, ebx
lea ecx, [esp + 0x98]
call fcn.00406c46
add dword [ebx + 0xc], 0xfffffff0
lea edx, [esp + 0x98]
lea ecx, [esp + 0x30]
mov dword [esp], 0x466bb4
call fcn.00407b45
pop ecx
cmp dword [eax + 0x14], 8
jb 0x451c5a
mov eax, dword [eax]
push eax
mov edx, str.global_uninst_wnd_title
lea ecx, [esp + 0x80]
call fcn.00450fc9
pop ecx
push esi
push 1
lea ecx, [esp + 0x34]
call fcn.004016ce
mov edx, str.global_uninstall_no_prompt
mov ecx, ebx
call fcn.0040a72d
mov edx, edi
mov ecx, ebx
call fcn.0040a446
add dword [ebx + 0xc], 0xfffffff0
mov esi, eax
mov edx, str.global_uninstall_no_start_prompt
mov dword [esp + 0x10], esi
mov ecx, ebx
call fcn.0040a72d
mov edx, edi
mov ecx, ebx
call fcn.0040a446
add dword [ebx + 0xc], 0xfffffff0
lea ecx, [esp + 0x94]
cmp dword [esp + 0xa8], 8
mov edi, eax
lea eax, [esp + 0x10c]
cmovae ecx, dword [esp + 0x94]
push ecx
push 0x466c14
push eax
call fcn.00401229
add esp, 0xc
lea eax, [esp + 0x10c]
cmp dword [esp + 0x120], 8
lea ecx, [esp + 0xf4]
mov edx, str.global_uninst_confirm_tips
cmovae eax, dword [esp + 0x10c]
push eax
call fcn.00450fc9
test esi, esi
mov esi, dword [sym.imp.USER32.dll_MessageBoxW]
pop ecx
jne 0x451da1
test edi, edi
jne 0x451da1
cmp dword [esp + 0x90], 8
lea ecx, [esp + 0x7c]
push 0x10021
cmovae ecx, dword [esp + 0x80]
lea eax, [esp + 0xf8]
cmp dword [esp + 0x10c], 8
push ecx
cmovae eax, dword [esp + 0xfc]
push eax
push edi
call esi
cmp eax, 2
jne 0x451da3
xor ebx, ebx
push ebx
push 1
lea ecx, [esp + 0xfc]
call fcn.004016ce
push ebx
push 1
lea ecx, [esp + 0x114]
call fcn.004016ce
push ebx
push 1
lea ecx, [esp + 0x84]
call fcn.004016ce
push ebx
push 1
lea ecx, [esp + 0x9c]
call fcn.004016ce
mov esi, dword [esp + 0x28]
jmp 0x451e95
xor edi, edi
mov edx, str.DTLSE_OnUninstall
mov ecx, ebx
call fcn.0040a72d
or edx, 0xffffffff
mov ecx, ebx
call fcn.0040a2be
cmp eax, 6
jne 0x451dcd
call fcn.0040446c
push edi
push edi
push ebx
call fcn.00450428
jmp 0x451dd1
add dword [ebx + 0xc], 0xfffffff0
push 0x466c74
lea edx, [esp + 0x98]
lea ecx, [esp + 0x30]
call fcn.00407b45
pop ecx
cmp dword [eax + 0x14], 8
jb 0x451def
mov eax, dword [eax]
push eax
mov edx, str.global_uninstall_tips
lea ecx, [esp + 0xe0]
call fcn.00450fc9
pop ecx
push edi
push 1
lea ecx, [esp + 0x34]
call fcn.004016ce
cmp dword [esp + 0x10], 0
jne 0x451e4a
cmp dword [esp + 0x90], 8
lea ecx, [esp + 0x7c]
push 0x10040
cmovae ecx, dword [esp + 0x80]
lea eax, [esp + 0xe0]
cmp dword [esp + 0xf4], 8
push ecx
cmovae eax, dword [esp + 0xe4]
push eax
push edi
call esi
mov edx, str.DTLSE_AfterUnintall
mov ecx, ebx
call fcn.0040a72d
or edx, 0xffffffff
mov ecx, ebx
call fcn.0040a2be
cmp eax, 6
jne 0x451e74
call fcn.0040446c
push edi
push edi
push ebx
call fcn.00450428
jmp 0x451e78
add dword [ebx + 0xc], 0xfffffff0
call fcn.0045129a
xor ebx, ebx
lea ecx, [esp + 0xdc]
push ebx
push 1
call fcn.004016ce
jmp 0x451d5c
xor ebx, ebx
lea ecx, [esp + 0x24]
call fcn.00403ed7
push ebx
push 1
lea ecx, [esp + 0xb4]
call fcn.004016ce
push ebx
push 1
lea ecx, [esp + 0xcc]
call fcn.004016ce
jmp 0x451f41
mov eax, dword [esp + 0x60]
cmp dword [eax + 0x14], 8
jb 0x451ecf
mov ecx, dword [eax]
jmp 0x451ed3
mov ecx, dword [esp + 0x60]
call fcn.0045107b
test al, al
je 0x4519f3
call fcn.0040446c
mov ecx, eax
call fcn.00450a61
mov edi, eax
mov edx, str.DTLSE_StartHook
mov ecx, edi
call fcn.0040a72d
or edx, 0xffffffff
mov ecx, edi
call fcn.0040a2be
cmp eax, 6
jne 0x451f18
call fcn.0040446c
push ebx
push ebx
push edi
call fcn.00450428
jmp 0x451f1c
add dword [edi + 0xc], 0xfffffff0
lea eax, [esp + 0x48]
push eax
lea ecx, [esp + 0x18]
call fcn.00407826
mov ecx, eax
call fcn.004512f0
xor ebx, ebx
lea ecx, [esp + 0x48]
test al, al
sete bl
call fcn.00407a9f
push 0
push 1
lea ecx, [esp + 0x6c]
call fcn.004016ce
cmp dword [esp + 0x18], 0
je 0x451f5f
push dword [esp + 0x18]
call dword [sym.imp.KERNEL32.dll_LocalFree]
test esi, esi
js 0x451f69
call dword [sym.imp.ole32.dll_CoUninitialize]
lea eax, [esp + 0x140]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
mov ecx, dword [esp + 0xb4c]
mov eax, ebx
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00423822
mov esp, ebp
pop ebp
ret 0x10