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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xa60
mov eax, dword [0x47a550]
xor eax, esp
mov dword [esp + 0xa5c], eax
push esi
push edi
lea eax, [esp + 0x58]
push eax
mov esi, 0x104
push esi
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
lea eax, [esp + 0x10]
mov dword [esp + 0xc], eax
xor eax, eax
xor edi, edi
mov edx, esi
lea ecx, [esp + 0x10]
mov dword [esp + 0x24], 7
mov dword [esp + 0x20], edi
mov word [esp + 0x10], ax
call fcn.00401e08
push esi
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov ecx, dword [esp + 0xc]
push eax
call fcn.00401dea
lea ecx, [esp + 0xc]
call fcn.004022c1
mov eax, dword [esp + 0xc]
cmp dword [eax + 0x14], 8
jb 0x401fb2
mov eax, dword [eax]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
push edi
push 1
lea ecx, [esp + 0x18]
call fcn.00401c90
push edi
call dword [sym.imp.ole32.dll_CoInitialize]
call fcn.004022e4
mov ecx, eax
call fcn.00403872
test eax, eax
je 0x40204a
push ecx
mov eax, esp
push ecx
mov dword [eax], 0x45ba90
mov eax, esp
mov esi, 0x45ba9c
mov dword [eax], esi
call fcn.004022e4
mov ecx, eax
call fcn.00403cd8
test eax, eax
jne 0x402075
mov esi, str.hwang
lea edi, [esp + 0x260]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
push 0x7f2
xor edi, edi
lea eax, [esp + 0x272]
push edi
push eax
call fcn.0042e030
add esp, 0xc
push str.DoResLua_failed__DAR0
lea eax, [esp + 0x270]
push eax
call fcn.0042e0c0
pop ecx
pop ecx
lea eax, [esp + 0x260]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov esi, edi
call dword [sym.imp.ole32.dll_CoUninitialize]
lea eax, [esp + 0x58]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
mov ecx, dword [esp + 0xa64]
pop edi
mov eax, esi
pop esi
xor ecx, esp
call fcn.0042d16b
mov esp, ebp
pop ebp
ret 0x10
push ecx
mov eax, esp
push ecx
mov dword [eax], 0x45bae0
mov eax, esp
mov dword [eax], esi
call fcn.004022e4
mov ecx, eax
call fcn.00403cd8
test eax, eax
jne 0x4020c6
mov esi, str.hwang
lea edi, [esp + 0x260]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
push 0x7f2
xor edi, edi
lea eax, [esp + 0x272]
push edi
push eax
call fcn.0042e030
add esp, 0xc
push str.DoResLua_failed__DAR2
jmp 0x40202d
call fcn.004022e4
mov ecx, eax
call fcn.00403cd5
mov esi, eax
mov edx, str.global_install_mutex_guid
mov ecx, esi
call fcn.0040d6ab
push 0xffffffffffffffff
mov edx, esi
lea ecx, [esp + 0x2c]
call fcn.004027ac
add dword [esi + 0xc], 0xfffffff0
pop ecx
mov edx, 0x45bb34
mov ecx, esi
call fcn.0040d6ab
push edi
or edx, 0xffffffff
mov ecx, esi
call fcn.0040d37d
add dword [esi + 0xc], 0xfffffff0
cmp dword [esp + 0x3c], 0
pop ecx
mov edi, eax
jne 0x402127
push str.GlobalA043B702_166A_4FB8_9733_E2BC4713F36F
lea ecx, [esp + 0x2c]
call fcn.00401a39
jmp 0x402129
xor edi, edi
and dword [esp + 8], 0
cmp dword [esp + 0x3c], 8
push edi
lea eax, [esp + 0x2c]
cmovae eax, dword [esp + 0x2c]
push ecx
push eax
lea ecx, [esp + 0x14]
call fcn.00401e30
test eax, eax
jne 0x402155
xor edi, edi
mov esi, edi
jmp 0x4022b0
mov edx, 0x45bbc0
mov ecx, esi
call fcn.0040d6ab
or edx, 0xffffffff
mov ecx, esi
call fcn.0040d24f
cmp eax, 6
jne 0x402181
call fcn.004022e4
xor edi, edi
push edi
push edi
push esi
call fcn.00404637
jmp 0x402187
add dword [esi + 0xc], 0xfffffff0
xor edi, edi
mov edx, str.DTLSE_BeforeInstall
mov ecx, esi
call fcn.0040d6ab
or edx, 0xffffffff
mov ecx, esi
call fcn.0040d24f
cmp eax, 6
jne 0x4021b1
call fcn.004022e4
push edi
push edi
push esi
call fcn.00404637
jmp 0x4021b5
add dword [esi + 0xc], 0xfffffff0
mov edx, str.global_install_path
mov ecx, esi
call fcn.0040d6ab
push 0xffffffffffffffff
mov edx, esi
lea ecx, [esp + 0x44]
call fcn.004027ac
add dword [esi + 0xc], 0xfffffff0
pop ecx
lea edx, [esp + 0x40]
mov ecx, esi
call fcn.004026cf
mov edx, str.InstallPath
mov ecx, esi
call fcn.0040d9af
mov edx, str.DTLSE_BeforeInstall
mov ecx, esi
call fcn.0040d6ab
or edx, 0xffffffff
mov ecx, esi
call fcn.0040d24f
cmp eax, 6
jne 0x402214
call fcn.004022e4
push edi
push edi
push esi
call fcn.00404637
jmp 0x402218
add dword [esi + 0xc], 0xfffffff0
mov edx, str.DTLSE_OnInstall
mov ecx, esi
call fcn.0040d6ab
or edx, 0xffffffff
mov ecx, esi
call fcn.0040d24f
cmp eax, 6
jne 0x402242
call fcn.004022e4
push edi
push edi
push esi
call fcn.00404637
jmp 0x402246
add dword [esi + 0xc], 0xfffffff0
mov edx, str.DTLSE_BeforeComplete
mov ecx, esi
call fcn.0040d6ab
or edx, 0xffffffff
mov ecx, esi
call fcn.0040d24f
cmp eax, 6
jne 0x402270
call fcn.004022e4
push edi
push edi
push esi
call fcn.00404637
jmp 0x402274
add dword [esi + 0xc], 0xfffffff0
mov edx, str.DTLSE_AfterComplete
mov ecx, esi
call fcn.0040d6ab
or edx, 0xffffffff
mov ecx, esi
call fcn.0040d24f
cmp eax, 6
jne 0x40229e
call fcn.004022e4
push edi
push edi
push esi
call fcn.00404637
jmp 0x4022a2
add dword [esi + 0xc], 0xfffffff0
xor esi, esi
inc esi
push edi
push esi
lea ecx, [esp + 0x48]
call fcn.00401c90
push edi
push 1
lea ecx, [esp + 0x30]
call fcn.00401c90
jmp 0x40204c