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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x244
mov eax, dword [0x53a090]
xor eax, esp
mov dword [esp + 0x240], eax
push ebx
mov ebx, dword [ebp + 0x14]
push esi
push edi
mov edi, dword [ebp + 8]
mov dword [esp + 0x14], edi
mov dword [0x56e6cc], edi
call dword [sym.imp.KERNEL32.dll_GetVersion]
movzx ecx, al
movzx eax, ah
shl cx, 8
push 0x567298
or cx, ax
push 0x104
mov word [0x56e1ac], cx
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
lea eax, [esp + 0x40]
push 0x104
push eax
push 0
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]
mov eax, 0x500
cmp word [0x56e1ac], ax
jae 0x4581be
push 0
push 0
lea eax, [esp + 0x18]
push eax
push 0x400
push 0x47e
push 0
push 0x1300
call dword [sym.imp.KERNEL32.dll_FormatMessageW]
push 0x30
push 0x40a01c
push dword [esp + 0x18]
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
push dword [esp + 0x10]
call dword [sym.imp.KERNEL32.dll_LocalFree]
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x240]
xor ecx, esp
call fcn.0050ecf7
mov esp, ebp
pop ebp
ret 0x10
call fcn.00454920
mov dword [0x5674b8], eax
call fcn.004479b0
call fcn.004645f0
call fcn.004659e0
call fcn.00465bc0
mov ecx, 0x565908
call fcn.00465d50
call fcn.00465560
call fcn.004548d0
cmp dword [0x5676d4], 0
je 0x458217
call fcn.004424f0
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x240]
xor ecx, esp
call fcn.0050ecf7
mov esp, ebp
pop ebp
ret 0x10
cmp dword [0x5674b8], 0
mov esi, dword [sym.imp.SHLWAPI.dll_StrCatW]
je 0x458232
push 0x40a030
push 0x53d6c0
call esi
cmp dword [0x56793c], 0
je 0x458247
push 0x40a034
push 0x53d6c0
call esi
call fcn.00468020
test eax, eax
jne 0x4581a5
call fcn.00467e50
test eax, eax
jne 0x4581a5
call fcn.00467850
test eax, eax
jne 0x4581a5
push eax
call dword [sym.imp.ole32.dll_OleInitialize]
lea eax, [esp + 0x1c]
push eax
mov dword [esp + 0x20], 8
mov dword [esp + 0x24], 0x6ff
call dword [sym.imp.COMCTL32.dll_InitCommonControlsEx]
push 0x40a038
call dword [sym.imp.USER32.dll_RegisterWindowMessageW]
push 0x409ce0
mov dword [0x5674c0], eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov ecx, edi
mov dword [0x565b28], eax
call fcn.0049cf60
mov ecx, edi
call fcn.0048fcb0
call fcn.004c45f0
call fcn.00462a50
mov ecx, edi
call fcn.00458410
test eax, eax
je 0x4581a5
push ebx
mov ecx, edi
call fcn.00458480
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x4581a5
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
push 0
push 0
mov dword [esp + 0x20], eax
push 0
lea eax, [esp + 0x30]
push eax
call dword [sym.imp.USER32.dll_GetMessageW]
test eax, eax
je 0x4583c3
mov esi, dword [sym.imp.USER32.dll_TranslateAcceleratorW]
mov edi, dword [esp + 0x10]
jmp 0x458330
push dword [0x565b18]
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je 0x458383
mov ecx, dword [esp + 0x24]
mov eax, dword [0x565b18]
cmp ecx, eax
je 0x45835e
push ecx
push eax
call dword [sym.imp.USER32.dll_IsChild]
test eax, eax
je 0x458383
mov eax, dword [0x565b18]
lea ecx, [esp + 0x24]
push ecx
push dword [esp + 0x1c]
push eax
call esi
test eax, eax
jne 0x4583a6
lea eax, [esp + 0x24]
push eax
push dword [0x565b18]
call dword [sym.imp.USER32.dll_IsDialogMessageW]
test eax, eax
jne 0x4583a6
lea eax, [esp + 0x24]
push eax
push edi
push ebx
call esi
test eax, eax
jne 0x4583a6
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]
push 0
push 0
push 0
lea eax, [esp + 0x30]
push eax
call dword [sym.imp.USER32.dll_GetMessageW]
test eax, eax
jne 0x458330
mov edi, dword [esp + 0x14]
call fcn.004903b0
push edi
push 0x53d6c0
call dword [sym.imp.USER32.dll_UnregisterClassW]
mov eax, dword [0x565b28]
test eax, eax
je 0x4583e4
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
call dword [sym.imp.ole32.dll_OleUninitialize]
mov ecx, dword [esp + 0x24c]
mov eax, dword [esp + 0x2c]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0050ecf7
mov esp, ebp
pop ebp
ret 0x10