Function at 0x4516bd
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.00403c5b
lea ecx, [esp + 0x2c]
call fcn.00401a28
mov eax, dword [esp + 0x2c]
cmp dword [eax + 0x14], 8
jb 0x45172e
mov eax, dword [eax]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
push esi
push 1
lea ecx, [esp + 0x38]
call fcn.0040171b
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.00407766
call fcn.00404350
mov ecx, eax
call fcn.00450935
test eax, eax
jne 0x451796
xor ebx, ebx
jmp 0x451e16
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 0x4517ff
and dword [esp + 0x58], eax
mov dword [esp + 0x5c], edi
mov edi, 0x4669d0
push edi
mov word [esp + 0x4c], ax
call fcn.00429215
pop ecx
push eax
push edi
lea ecx, [esp + 0x50]
call fcn.00401466
push 3
pop ebx
push 0
lea eax, [esp + 0x30]
push eax
lea ecx, [esp + 0x1c]
call fcn.0040767c
lea edx, [esp + 0x48]
mov ecx, eax
call fcn.00405599
mov byte [esp + 0xf], 1
test al, al
jne 0x451804
mov byte [esp + 0xf], 0
test bl, 2
je 0x451819
push 0
push 1
lea ecx, [esp + 0x34]
and ebx, 0xfffffffd
call fcn.0040171b
test bl, 1
je 0x45182e
xor ebx, ebx
lea ecx, [esp + 0x48]
push ebx
push 1
call fcn.0040171b
jmp 0x451830
xor ebx, ebx
cmp byte [esp + 0xf], 0
je 0x451d89
push 1
lea eax, [esp + 0x30]
push eax
lea ecx, [esp + 0x1c]
call fcn.0040767c
lea ecx, [esp + 0x128]
push eax
mov dword [esp + 0x128], ecx
call fcn.00401b52
push dword [esp + 0x124]
mov ecx, dword [esp + 0x64]
call fcn.0040439d
push ebx
push 1
lea ecx, [esp + 0x130]
call fcn.0040171b
push ebx
push 1
lea ecx, [esp + 0x34]
call fcn.0040171b
mov eax, dword [esp + 0x60]
cmp dword [eax + 0x14], 8
jb 0x451896
mov eax, dword [eax]
push eax
call dword [sym.imp.SHLWAPI.dll_PathUnquoteSpacesW]
mov ecx, dword [esp + 0x60]
call fcn.00401b7a
mov ecx, dword [esp + 0x60]
cmp dword [ecx + 0x14], 8
jb 0x4518b2
mov ecx, dword [ecx]
call fcn.00450f30
test al, al
jne 0x4518c3
xor ebx, ebx
inc ebx
jmp 0x451e09
call fcn.00404350
mov ecx, eax
call fcn.00450916
mov ebx, eax
mov edx, str.global_app_id
mov ecx, ebx
call fcn.0040a5ef
push 0
or edx, 0xffffffff
mov ecx, ebx
call fcn.0040a2b6
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.0040a5ef
push 0xffffffffffffffff
mov edx, ebx
lea ecx, [esp + 0xc8]
call fcn.00406b2a
add dword [ebx + 0xc], 0xfffffff0
mov edx, str.global_install_mutex_guid
pop ecx
mov ecx, ebx
call fcn.0040a5ef
push 0xffffffffffffffff
mov edx, ebx
lea ecx, [esp + 0xb0]
call fcn.00406b2a
add dword [ebx + 0xc], 0xfffffff0
cmp dword [esp + 0xd8], 0
pop ecx
jne 0x45195f
push str.GlobalFE1A11F2_E01F_4421_90FD_2409A1BA5EFD
call fcn.00429215
pop ecx
push eax
push str.GlobalFE1A11F2_E01F_4421_90FD_2409A1BA5EFD
lea ecx, [esp + 0xcc]
call fcn.00401466
jmp 0x451961
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.0040782e
test eax, eax
je 0x451d5b
cmp dword [esp + 0xbc], 0
jne 0x4519bb
mov edi, str.GlobalA043B702_166A_4FB8_9733_E2BC4713F36F
push edi
call fcn.00429215
pop ecx
push eax
push edi
lea ecx, [esp + 0xb4]
call fcn.00401466
jmp 0x4519c0
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.0040782e
test eax, eax
jne 0x451a40
push 0x466b28
mov edx, str.global_uninst_wait_for_inst_exit
lea ecx, [esp + 0x4c]
call fcn.00450e7e
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.0040171b
lea ecx, [esp + 0x20]
call fcn.00403d8a
jmp 0x451d5d
lea ecx, [esp + 0x20]
call fcn.00403d8a
mov edx, dword [esp + 0x60]
mov ecx, ebx
call fcn.00406824
mov edx, str.global_install_path
mov ecx, ebx
call fcn.0040a915
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.00426130
mov eax, dword [esp + 0x6c]
add esp, 0xc
cmp dword [eax + 0x14], 8
jb 0x451a95
mov eax, dword [eax]
push eax
lea eax, [esp + 0x358]
push eax
call fcn.00406a87
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.0040a5ef
or edi, 0xffffffff
mov ecx, ebx
mov edx, edi
call fcn.0040a180
cmp eax, 6
jne 0x451adf
call fcn.00404350
push esi
push esi
push ebx
call fcn.004502dd
jmp 0x451ae3
add dword [ebx + 0xc], 0xfffffff0
mov edx, str.global_product_name
mov ecx, ebx
call fcn.0040a5ef
push edi
mov edx, ebx
lea ecx, [esp + 0x98]
call fcn.00406b2a
add dword [ebx + 0xc], 0xfffffff0
lea edx, [esp + 0x98]
lea ecx, [esp + 0x30]
mov dword [esp], 0x466bb4
call fcn.00407a07
pop ecx
cmp dword [eax + 0x14], 8
jb 0x451b22
mov eax, dword [eax]
push eax
mov edx, str.global_uninst_wnd_title
lea ecx, [esp + 0x80]
call fcn.00450e7e
pop ecx
push esi
push 1
lea ecx, [esp + 0x34]
call fcn.0040171b
mov edx, str.global_uninstall_no_prompt
mov ecx, ebx
call fcn.0040a5ef
mov edx, edi
mov ecx, ebx
call fcn.0040a308
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.0040a5ef
mov edx, edi
mov ecx, ebx
call fcn.0040a308
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.00401276
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.00450e7e
test esi, esi
mov esi, dword [sym.imp.USER32.dll_MessageBoxW]
pop ecx
jne 0x451c69
test edi, edi
jne 0x451c69
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 0x451c6b
xor ebx, ebx
push ebx
push 1
lea ecx, [esp + 0xfc]
call fcn.0040171b
push ebx
push 1
lea ecx, [esp + 0x114]
call fcn.0040171b
push ebx
push 1
lea ecx, [esp + 0x84]
call fcn.0040171b
push ebx
push 1
lea ecx, [esp + 0x9c]
call fcn.0040171b
mov esi, dword [esp + 0x28]
jmp 0x451d5d
xor edi, edi
mov edx, str.DTLSE_OnUninstall
mov ecx, ebx
call fcn.0040a5ef
or edx, 0xffffffff
mov ecx, ebx
call fcn.0040a180
cmp eax, 6
jne 0x451c95
call fcn.00404350
push edi
push edi
push ebx
call fcn.004502dd
jmp 0x451c99
add dword [ebx + 0xc], 0xfffffff0
push 0x466c74
lea edx, [esp + 0x98]
lea ecx, [esp + 0x30]
call fcn.00407a07
pop ecx
cmp dword [eax + 0x14], 8
jb 0x451cb7
mov eax, dword [eax]
push eax
mov edx, str.global_uninstall_tips
lea ecx, [esp + 0xe0]
call fcn.00450e7e
pop ecx
push edi
push 1
lea ecx, [esp + 0x34]
call fcn.0040171b
cmp dword [esp + 0x10], 0
jne 0x451d12
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.0040a5ef
or edx, 0xffffffff
mov ecx, ebx
call fcn.0040a180
cmp eax, 6
jne 0x451d3c
call fcn.00404350
push edi
push edi
push ebx
call fcn.004502dd
jmp 0x451d40
add dword [ebx + 0xc], 0xfffffff0
call fcn.0045114f
xor ebx, ebx
lea ecx, [esp + 0xdc]
push ebx
push 1
call fcn.0040171b
jmp 0x451c24
xor ebx, ebx
lea ecx, [esp + 0x24]
call fcn.00403d8a
push ebx
push 1
lea ecx, [esp + 0xb4]
call fcn.0040171b
push ebx
push 1
lea ecx, [esp + 0xcc]
call fcn.0040171b
jmp 0x451e09
mov eax, dword [esp + 0x60]
cmp dword [eax + 0x14], 8
jb 0x451d97
mov ecx, dword [eax]
jmp 0x451d9b
mov ecx, dword [esp + 0x60]
call fcn.00450f30
test al, al
je 0x4518bb
call fcn.00404350
mov ecx, eax
call fcn.00450916
mov edi, eax
mov edx, str.DTLSE_StartHook
mov ecx, edi
call fcn.0040a5ef
or edx, 0xffffffff
mov ecx, edi
call fcn.0040a180
cmp eax, 6
jne 0x451de0
call fcn.00404350
push ebx
push ebx
push edi
call fcn.004502dd
jmp 0x451de4
add dword [edi + 0xc], 0xfffffff0
lea eax, [esp + 0x48]
push eax
lea ecx, [esp + 0x18]
call fcn.0040770a
mov ecx, eax
call fcn.004511a5
xor ebx, ebx
lea ecx, [esp + 0x48]
test al, al
sete bl
call fcn.00407961
push 0
push 1
lea ecx, [esp + 0x6c]
call fcn.0040171b
cmp dword [esp + 0x18], 0
je 0x451e27
push dword [esp + 0x18]
call dword [sym.imp.KERNEL32.dll_LocalFree]
test esi, esi
js 0x451e31
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.00423710
mov esp, ebp
pop ebp
ret 0x10