Function at 0x40e631
Capabilities:
Get common file path
Set current directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x23c
mov eax, dword [0x5b41f4]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x14]
push ebx
mov ebx, dword [ebp + 0x10]
push esi
push edi
mov edi, dword [ebp + 8]
mov dword [ebp - 0x218], edi
mov dword [ebp - 0x210], eax
mov dword [0x5c0b94], edi
call dword [sym.imp.KERNEL32.dll_GetVersion]
movzx eax, ax
mov esi, 0x104
movzx ecx, al
shl cx, 8
shr ax, 8
push 0x5b9c88
or cx, ax
push esi
mov word [0x5c0b90], cx
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
push esi
lea eax, [ebp - 0x20c]
xor esi, esi
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
push 0x8001
call dword [sym.imp.KERNEL32.dll_SetErrorMode]
mov eax, 0x500
cmp word [0x5c0b90], ax
jae 0x40e727
push esi
push esi
lea eax, [ebp - 0x210]
push eax
push 0x400
push 0x47e
push esi
push 0x1300
call dword [sym.imp.KERNEL32.dll_FormatMessageW]
push 0x30
push 0x561fb8
push dword [ebp - 0x210]
push esi
call dword [sym.imp.USER32.dll_MessageBoxW]
push dword [ebp - 0x210]
call dword [sym.imp.KERNEL32.dll_LocalFree]
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004afcaa
leave
ret 0x10
call fcn.0040ca4b
mov dword [0x5b9c40], eax
call fcn.0040ad0e
call fcn.0040ff51
call fcn.00410c09
call fcn.00410d58
push 0x5b9c48
call fcn.0040ca03
pop ecx
cmp dword [0x5b9ef8], esi
je 0x40e761
push esi
call fcn.004026b1
pop ecx
jmp 0x40e714
cmp dword [0x5b9c40], esi
mov esi, dword [sym.imp.SHLWAPI.dll_StrCatW]
je 0x40e77b
push 0x561fd4
push 0x561f98
call esi
cmp dword [0x5b9ed0], 0
je 0x40e790
push 0x561fd8
push 0x561f98
call esi
call fcn.0040f53d
test eax, eax
jne 0x40e714
call fcn.0040f3ac
test eax, eax
jne 0x40e714
call fcn.0040f3a9
test eax, eax
jne 0x40e714
push eax
call dword [sym.imp.ole32.dll_OleInitialize]
lea eax, [ebp - 0x220]
mov dword [ebp - 0x220], 8
push eax
mov dword [ebp - 0x21c], 0x6ff
call dword [sym.imp.COMCTL32.dll_InitCommonControlsEx]
push 0x561fdc
call dword [sym.imp.USER32.dll_RegisterWindowMessageW]
push str.uxtheme.dll
mov dword [0x5b840c], eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
push edi
mov dword [0x5b8410], eax
call fcn.004a33b1
push edi
call fcn.0040e94a
pop ecx
pop ecx
test eax, eax
je 0x40e714
push dword [ebp - 0x210]
push ebx
push edi
call fcn.0040e9ac
mov ebx, eax
add esp, 0xc
test ebx, ebx
je 0x40e714
mov esi, dword [sym.imp.USER32.dll_LoadAcceleratorsW]
push 0x64
push edi
call esi
push 0x65
push edi
mov dword [ebp - 0x210], eax
call esi
mov esi, dword [sym.imp.USER32.dll_GetMessageW]
mov dword [ebp - 0x214], eax
xor eax, eax
push eax
push eax
push eax
lea eax, [ebp - 0x23c]
push eax
call esi
test eax, eax
je 0x40e918
mov edi, dword [ebp - 0x210]
push dword [0x5b7ec4]
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je 0x40e8cf
mov eax, dword [0x5b7ec4]
cmp dword [ebp - 0x23c], eax
je 0x40e8a0
push dword [ebp - 0x23c]
push eax
call dword [sym.imp.USER32.dll_IsChild]
test eax, eax
je 0x40e8cf
mov eax, dword [0x5b7ec4]
lea ecx, [ebp - 0x23c]
push ecx
push dword [ebp - 0x214]
push eax
call dword [sym.imp.USER32.dll_TranslateAcceleratorW]
test eax, eax
jne 0x40e8fc
lea eax, [ebp - 0x23c]
push eax
push dword [0x5b7ec4]
call dword [sym.imp.USER32.dll_IsDialogMessageW]
test eax, eax
jne 0x40e8fc
lea eax, [ebp - 0x23c]
push eax
push edi
push ebx
call dword [sym.imp.USER32.dll_TranslateAcceleratorW]
test eax, eax
jne 0x40e8fc
lea eax, [ebp - 0x23c]
push eax
call dword [sym.imp.USER32.dll_TranslateMessage]
lea eax, [ebp - 0x23c]
push eax
call dword [sym.imp.USER32.dll_DispatchMessageW]
xor eax, eax
push eax
push eax
push eax
lea eax, [ebp - 0x23c]
push eax
call esi
test eax, eax
jne 0x40e86d
mov edi, dword [ebp - 0x218]
call fcn.004a33b4
push edi
push 0x561f98
call dword [sym.imp.USER32.dll_UnregisterClassW]
mov eax, dword [0x5b8410]
test eax, eax
je 0x40e939
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
call dword [sym.imp.ole32.dll_OleUninitialize]
mov eax, dword [ebp - 0x234]
jmp 0x40e716