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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x244
mov eax, dword [0x4f8004]
xor eax, esp
mov dword [esp + 0x240], eax
mov eax, dword [ebp + 0x14]
push ebx
mov ebx, dword [ebp + 0x10]
push esi
push edi
mov edi, dword [ebp + 8]
mov dword [esp + 0x18], edi
mov dword [esp + 0x10], eax
mov dword [0x52a6a0], edi
call dword [sym.imp.KERNEL32.dll_GetVersion]
movzx eax, ax
mov esi, 0x104
movzx ecx, al
shl cx, 8
shr ax, 8
push 0x523808
or cx, ax
push esi
mov word [0x52a5ec], cx
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
push esi
lea eax, [esp + 0x44]
xor esi, esi
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea eax, [esp + 0x40]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
lea eax, [esp + 0x40]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
push 0x8001
call dword [sym.imp.KERNEL32.dll_SetErrorMode]
push 0xffffffffffffffff
push dword [0x524fec]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, 0x500
cmp word [0x52a5ec], ax
jae 0x412540
push esi
push esi
lea eax, [esp + 0x18]
push eax
push 0x400
push 0x47e
push esi
push 0x1300
call dword [sym.imp.KERNEL32.dll_FormatMessageW]
push 0x30
push 0x4c2c6c
push dword [esp + 0x18]
push esi
call dword [sym.imp.USER32.dll_MessageBoxW]
push dword [esp + 0x10]
call dword [sym.imp.KERNEL32.dll_LocalFree]
xor eax, eax
mov ecx, dword [esp + 0x24c]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00486c63
mov esp, ebp
pop ebp
ret 0x10
mov dword [0x524fd4], esi
call fcn.0040584c
call fcn.0041b805
call fcn.0041c766
call fcn.0041c8d7
mov ecx, 0x522d98
call fcn.0041ca2d
call fcn.0041c37d
call fcn.0040f700
cmp dword [0x523800], esi
je 0x41257f
xor ecx, ecx
call fcn.00401d11
jmp 0x412527
cmp dword [0x524fd4], esi
mov esi, dword [sym.imp.SHLWAPI.dll_StrCatW]
je 0x412599
push 0x4c2c88
push str.Notepad2
call esi
cmp dword [0x523b88], 0
je 0x4125ae
push 0x4c2c8c
push str.Notepad2
call esi
call fcn.0041e7ab
test eax, eax
jne 0x412527
call fcn.0041e625
test eax, eax
jne 0x412527
call fcn.0041e06f
test eax, eax
jne 0x412527
push eax
call dword [sym.imp.ole32.dll_OleInitialize]
lea eax, [esp + 0x1c]
mov dword [esp + 0x1c], 8
push eax
mov dword [esp + 0x24], 0x6ff
call dword [sym.imp.COMCTL32.dll_InitCommonControlsEx]
push 0x4c2c90
call dword [sym.imp.USER32.dll_RegisterWindowMessageW]
push str.uxtheme.dll
mov dword [0x523b84], eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov dword [0x522fb4], eax
call fcn.0041a439
mov ecx, edi
call fcn.00412740
test eax, eax
je 0x412527
push dword [esp + 0x10]
mov edx, ebx
mov ecx, edi
call fcn.0041279f
mov ebx, eax
pop ecx
test ebx, ebx
je 0x412527
mov esi, dword [sym.imp.USER32.dll_LoadAcceleratorsW]
push 0x64
push edi
call esi
push 0x65
push edi
mov dword [esp + 0x18], eax
call esi
mov esi, dword [sym.imp.USER32.dll_GetMessageW]
mov dword [esp + 0x14], eax
xor eax, eax
push eax
push eax
push eax
lea eax, [esp + 0x30]
push eax
call esi
test eax, eax
je 0x412710
mov edi, dword [esp + 0x10]
push dword [0x522fa0]
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je 0x4126d1
mov eax, dword [0x522fa0]
cmp dword [esp + 0x24], eax
je 0x4126a8
push dword [esp + 0x24]
push eax
call dword [sym.imp.USER32.dll_IsChild]
test eax, eax
je 0x4126d1
mov eax, dword [0x522fa0]
lea ecx, [esp + 0x24]
push ecx
push dword [esp + 0x18]
push eax
call dword [sym.imp.USER32.dll_TranslateAcceleratorW]
test eax, eax
jne 0x4126f8
lea eax, [esp + 0x24]
push eax
push dword [0x522fa0]
call dword [sym.imp.USER32.dll_IsDialogMessageW]
test eax, eax
jne 0x4126f8
lea eax, [esp + 0x24]
push eax
push edi
push ebx
call dword [sym.imp.USER32.dll_TranslateAcceleratorW]
test eax, eax
jne 0x4126f8
lea eax, [esp + 0x24]
push eax
call dword [sym.imp.USER32.dll_TranslateMessage]
lea eax, [esp + 0x24]
push eax
call dword [sym.imp.USER32.dll_DispatchMessageW]
xor eax, eax
push eax
push eax
push eax
lea eax, [esp + 0x30]
push eax
call esi
test eax, eax
jne 0x412679
mov edi, dword [esp + 0x18]
call fcn.0047889d
push edi
push str.Notepad2
call dword [sym.imp.USER32.dll_UnregisterClassW]
mov eax, dword [0x522fb4]
test eax, eax
je 0x412731
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
call dword [sym.imp.ole32.dll_OleUninitialize]
mov eax, dword [esp + 0x2c]
jmp 0x412529