Function at 0x417e30
Capabilities:
Get common file path
Query environment variable
Set current directory
Set environment variable
Terminate process

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x421b0c
mov eax, dword fs:[0]
push eax
mov eax, 0x20238
call fcn.0041eb90
mov eax, dword [0x4300b8]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x20224], eax
mov dword [ebx], 0
mov dword [ebp - 0x2021c], 0
mov dword [ebp - 0x2021c], ebp
mov ecx, dword [ebp - 0x2021c]
push 0
push ecx
push 0x428dec
call fcn.00417080
mov edi, eax
add esp, 0xc
test edi, edi
jne 0x417ea1
mov edi, str.__thiscall_CKKVLoader::CKKVLoader_wchar_t__bool_
push ebx
push edi
mov edx, str.__thiscall_CKKVLoader::CKKVLoader_wchar_t__bool_
mov ecx, 0x428e84
lea esi, [ebp - 0x20240]
call fcn.0040c280
mov dword [ebp - 4], 0
test edi, edi
jne 0x417ec5
push ebp
pop ebp
xor edx, edx
push 0x4256b8
mov word [ebx + 4], dx
call dword [sym.imp.OLEAUT32.dll_SysReAllocString]
mov esi, eax
mov dword [ebp - 0x20220], esi
test esi, esi
jne 0x417eec
push 0x8007000e
call fcn.004177e0
mov byte [ebp - 4], 1
cmp byte [ebp + 0xc], 0
je 0x417f3d
mov edi, dword [ebp - 0x20224]
cmp edi, esi
je 0x417fee
push esi
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
test edi, edi
je 0x417f30
push edi
call dword [sym.imp.OLEAUT32.dll_SysReAllocString]
mov esi, eax
mov dword [ebp - 0x20220], esi
test esi, esi
jne 0x417fee
push 0x8007000e
call fcn.004177e0
xor esi, esi
mov dword [ebp - 0x20220], esi
jmp 0x417fee
lea eax, [ebp - 0x20228]
push eax
call fcn.00417800
add esp, 4
mov edi, eax
mov byte [ebp - 4], 2
cmp esi, dword [edi]
je 0x417f8d
push esi
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov eax, dword [edi]
test eax, eax
je 0x417f74
push eax
call dword [sym.imp.OLEAUT32.dll_SysAllocStringByteLen]
mov ecx, dword [edi]
push eax
push ecx
call dword [sym.imp.OLEAUT32.dll_DllRegisterServer]
cmp dword [edi], 0
mov dword [ebp - 0x20220], eax
je 0x417f8d
test eax, eax
jne 0x417f8d
push 0x8007000e
call fcn.004177e0
mov byte [ebp - 4], 1
mov edx, dword [ebp - 0x20228]
push edx
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov esi, dword [sym.imp.KERNEL32.dll_lstrlenW]
push 0x4256b8
call esi
push eax
push 0x4256b8
lea eax, [ebp - 0x20220]
push eax
call fcn.00418630
test eax, eax
jge 0x417fc7
push eax
call fcn.004177e0
mov edi, dword [ebp - 0x20224]
push edi
call esi
push eax
push edi
lea ecx, [ebp - 0x20220]
push ecx
call fcn.00418630
test eax, eax
jge 0x417fe8
push eax
call fcn.004177e0
mov esi, dword [ebp - 0x20220]
xor edx, edx
push 0x206
push edx
lea eax, [ebp - 0x216]
push eax
mov word [ebp - 0x218], dx
call sub.MSVCR90.dll_memset
lea ecx, [ebp - 0x20224]
add esp, 0xc
push ecx
call fcn.00417800
add esp, 4
mov byte [ebp - 4], 3
mov eax, dword [eax]
push 0x104
push eax
lea edx, [ebp - 0x218]
push edx
call dword [sym.imp.MSVCR90.dll_wcsncpy]
add esp, 0xc
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x20224]
push eax
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
xor ecx, ecx
push 0xfffe
push ecx
lea edx, [ebp - 0x10216]
push edx
mov word [ebp - 0x10218], cx
call sub.MSVCR90.dll_memset
add esp, 0xc
xor eax, eax
push 0xfffe
push eax
lea ecx, [ebp - 0x20216]
push ecx
mov word [ebp - 0x20218], ax
call sub.MSVCR90.dll_memset
add esp, 0xc
push 0x8000
lea edx, [ebp - 0x10218]
push edx
push str.Path
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveBackslashW]
lea ecx, [ebp - 0x10218]
push ecx
lea edx, [ebp - 0x218]
push edx
push str._s__s
lea eax, [ebp - 0x20218]
push 0x8000
push eax
call dword [sym.imp.MSVCR90.dll__snwprintf]
add esp, 0x14
mov ecx, str.CKKVLoader::CKKVLoader
call fcn.0040bd20
test eax, eax
jne 0x418151
lea ecx, [ebp - 0x20218]
push ecx
push ecx
lea edx, [ebp - 0x218]
push edx
push ecx
mov edx, ebx
mov ecx, str.CKKVLoader::CKKVLoader
call fcn.00411ce0
mov edx, str._AddEnvironmentVariable_:
mov ecx, eax
call fcn.0040ba10
add esp, 4
push eax
call fcn.0040b8d0
mov edx, str.___GetEnvironmentVariable_:
mov ecx, eax
call fcn.0040ba10
add esp, 4
push eax
call fcn.0040b8d0
mov edi, eax
xor eax, eax
mov dword [0x430e60], eax
mov dword [edi + 0x248], eax
mov eax, dword [edi + 0x240]
push 1
push eax
push 1
xor ecx, ecx
mov edx, edi
call fcn.00416620
add edi, 0xc
push edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
lea ecx, [ebp - 0x20218]
push ecx
push str.Path
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
lea eax, [ebx + 4]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
lea edx, [ebp - 0x218]
push edx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
lea ecx, [ebp - 0x218]
mov edi, ebx
call fcn.00418310
test eax, eax
jne 0x4181ca
mov eax, dword [0x430e50]
cmp dword [eax + 0x30], 5
jg 0x4181bb
cmp dword [eax + 0x28], 0
jne 0x4181a7
cmp dword [eax + 0x2c], 0
je 0x4181bb
push 0
push 0x425b78
push 0x428ee8
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
push 0xfffffffffffffff6
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov ecx, str.CKKVLoader::CKKVLoader
call fcn.0040bd20
test eax, eax
jne 0x418234
push esi
push ecx
mov edx, ebx
mov ecx, str.CKKVLoader::CKKVLoader
call fcn.00411ce0
mov edx, str.LoadLibrary
mov ecx, eax
call fcn.0040ba10
add esp, 4
push eax
call fcn.0040b8d0
mov edx, str._start
mov ecx, eax
call fcn.0040ba10
mov edi, eax
xor eax, eax
mov dword [0x430e60], eax
mov dword [edi + 0x248], eax
mov eax, dword [edi + 0x240]
push 1
push eax
push 1
xor ecx, ecx
mov edx, edi
call fcn.00416620
add edi, 0xc
push edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
push esi
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov ecx, str.CKKVLoader::CKKVLoader
mov dword [ebx], eax
call fcn.0040bd20
test eax, eax
jne 0x4182a7
push esi
push ecx
mov edx, ebx
mov ecx, str.CKKVLoader::CKKVLoader
call fcn.00411ce0
mov edx, str.LoadLibrary
mov ecx, eax
call fcn.0040ba10
add esp, 4
push eax
call fcn.0040b8d0
mov edx, str._end
mov ecx, eax
call fcn.0040ba10
mov edi, eax
xor eax, eax
mov dword [0x430e60], eax
mov ecx, dword [edi + 0x240]
push 1
push ecx
push 1
xor ecx, ecx
mov edx, edi
mov dword [edi + 0x248], eax
call fcn.00416620
add edi, 0xc
push edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov byte [ebp - 4], 0
push esi
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x20240]
call fcn.0040bfc0
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0041e4d2
mov esp, ebp
pop ebp
ret 8