Function at 0x402d82
Capabilities:
Get common file path
Print debug messages
Set current directory

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xa54
mov eax, dword [0x477014]
xor eax, esp
mov dword [esp + 0xa50], eax
push ebx
push esi
push edi
push 8
pop edi
lea eax, [esp + 0x14]
mov dword [esp + 0x14], edi
push eax
mov dword [esp + 0x1c], 4
call dword [sym.imp.COMCTL32.dll_InitCommonControlsEx]
lea eax, [esp + 0x50]
mov esi, 0x104
push eax
push esi
call dword [sym.imp.KERNEL32.DLL_GetCurrentDirectoryW]
lea eax, [esp + 0x20]
mov dword [esp + 0x34], 7
mov dword [esp + 0x1c], eax
lea ecx, [esp + 0x20]
xor eax, eax
xor ebx, ebx
mov edx, esi
mov dword [esp + 0x30], ebx
mov word [esp + 0x20], ax
call fcn.00401d3c
push esi
push eax
push ebx
call dword [sym.imp.KERNEL32.DLL_GetModuleFileNameW]
mov ecx, dword [esp + 0x1c]
push eax
call fcn.00401d1e
lea ecx, [esp + 0x1c]
call fcn.004028fa
mov eax, dword [esp + 0x1c]
cmp dword [eax + 0x14], edi
jb 0x402e19
mov eax, dword [eax]
push eax
call dword [sym.imp.KERNEL32.DLL_SetCurrentDirectoryW]
push ebx
push 1
lea ecx, [esp + 0x28]
call fcn.00401bd2
push ebx
call dword [sym.imp.ole32.dll_CoInitialize]
mov esi, eax
mov dword [esp + 0x10], esi
call fcn.00403119
mov ecx, eax
call fcn.00405120
test eax, eax
je 0x402eb9
push ecx
mov eax, esp
mov edi, 0x464c00
push ecx
mov dword [eax], 0x464bf4
mov eax, esp
mov dword [eax], edi
call fcn.00403119
mov ecx, eax
call fcn.004055f0
test eax, eax
jne 0x402eea
mov esi, str.hwang
lea edi, [esp + 0x258]
push 0x7f2
lea eax, [esp + 0x26a]
push ebx
movsd dword es:[edi], dword [esi]
push eax
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
call fcn.00432310
add esp, 0xc
push str.DoResLua_failed__DAR0
lea eax, [esp + 0x268]
push eax
call fcn.0040320e
pop ecx
pop ecx
lea eax, [esp + 0x258]
push eax
call dword [sym.imp.KERNEL32.DLL_OutputDebugStringW]
mov esi, dword [esp + 0x10]
or ebx, 0xffffffff
test esi, esi
js 0x402ec6
call dword [sym.imp.ole32.dll_CoUninitialize]
lea eax, [esp + 0x50]
push eax
call dword [sym.imp.KERNEL32.DLL_SetCurrentDirectoryW]
mov ecx, dword [esp + 0xa5c]
mov eax, ebx
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0042fb8d
mov esp, ebp
pop ebp
ret 0x10
push ecx
mov eax, esp
push ecx
mov dword [eax], str.DAR2
mov eax, esp
mov dword [eax], edi
call fcn.00403119
mov ecx, eax
call fcn.004055f0
test eax, eax
jne 0x402f39
mov esi, str.hwang
lea edi, [esp + 0x258]
push 0x7f2
lea eax, [esp + 0x26a]
push ebx
movsd dword es:[edi], dword [esi]
push eax
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
call fcn.00432310
add esp, 0xc
push str.DoResLua_failed__DAR2
jmp 0x402e98
call fcn.00403119
mov ecx, eax
call fcn.004055ed
mov edi, eax
mov edx, str.global_install_mutex_guid
mov ecx, edi
call fcn.0040ee32
push 0xffffffffffffffff
mov edx, edi
lea ecx, [esp + 0x3c]
call fcn.004031dc
add dword [edi + 0xc], 0xfffffff0
mov edx, str.global_app_id
pop ecx
mov ecx, edi
call fcn.0040ee32
push ebx
or edx, 0xffffffff
mov ecx, edi
call fcn.0040eaf9
add dword [edi + 0xc], 0xfffffff0
pop ecx
mov dword [esp + 0x10], eax
cmp dword [esp + 0x48], ebx
jne 0x402fa7
push str.GlobalA043B702_166A_4FB8_9733_E2BC4713F36F
call fcn.00433d15
pop ecx
push eax
push str.GlobalA043B702_166A_4FB8_9733_E2BC4713F36F
lea ecx, [esp + 0x40]
call fcn.0040192a
jmp 0x402fab
mov dword [esp + 0x10], ebx
push dword [esp + 0x10]
cmp dword [esp + 0x50], 8
lea eax, [esp + 0x3c]
push ecx
cmovae eax, dword [esp + 0x40]
lea ecx, [esp + 0x1c]
push eax
mov dword [esp + 0x20], ebx
call fcn.00402c74
test eax, eax
je 0x4030ba
mov edx, str.DTLSE_BeforeInit
mov ecx, edi
call fcn.0040ee32
or edx, 0xffffffff
mov ecx, edi
call fcn.0040e9c3
cmp eax, 6
jne 0x402ffe
call fcn.00403119
push ebx
push ebx
push edi
call fcn.00405d4d
jmp 0x403002
add dword [edi + 0xc], 0xfffffff0
mov edx, str.DTLSE_BeforeInstall
mov ecx, edi
call fcn.0040ee32
or edx, 0xffffffff
mov ecx, edi
call fcn.0040e9c3
cmp eax, 6
jne 0x40302c
call fcn.00403119
push ebx
push ebx
push edi
call fcn.00405d4d
jmp 0x403030
add dword [edi + 0xc], 0xfffffff0
mov edx, str.DTLSE_OnInstall
mov ecx, edi
call fcn.0040ee32
or edx, 0xffffffff
mov ecx, edi
call fcn.0040e9c3
cmp eax, 6
jne 0x40305a
call fcn.00403119
push ebx
push ebx
push edi
call fcn.00405d4d
jmp 0x40305e
add dword [edi + 0xc], 0xfffffff0
mov edx, str.DTLSE_BeforeComplete
mov ecx, edi
call fcn.0040ee32
or edx, 0xffffffff
mov ecx, edi
call fcn.0040e9c3
cmp eax, 6
jne 0x403088
call fcn.00403119
push ebx
push ebx
push edi
call fcn.00405d4d
jmp 0x40308c
add dword [edi + 0xc], 0xfffffff0
mov edx, str.DTLSE_AfterComplete
mov ecx, edi
call fcn.0040ee32
or edx, 0xffffffff
mov ecx, edi
call fcn.0040e9c3
cmp eax, 6
jne 0x4030b6
call fcn.00403119
push ebx
push ebx
push edi
call fcn.00405d4d
jmp 0x4030ba
add dword [edi + 0xc], 0xfffffff0
lea ecx, [esp + 0x14]
call fcn.004030d4
push ebx
push 1
lea ecx, [esp + 0x40]
call fcn.00401bd2
jmp 0x402ebc