Function at 0x413810
Capabilities:
Check if file exists

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x46fbd9
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x468
mov eax, dword [0x4a5010]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0x45c], esi
lea ecx, [ebp - 0x450]
mov dword [ebp - 0x1c], 0
call dword [sym.imp.soui.dll_public:_void___thiscall_SOUI::SMenuEx::constructor_void_]
push str.SMENUEX:ContextMenu
lea ecx, [ebp - 0x450]
mov dword [ebp - 4], 0
call dword [sym.imp.soui.dll_public:_int___thiscall_SOUI::SMenuEx::LoadMenuW_wchar_t_const__]
cmp dword [0x4a9d1c], 0
mov ecx, 0x48ca58
mov eax, 0x48ca54
cmove eax, ecx
lea ecx, [ebp - 0x458]
push eax
call dword [sym.imp.utilities.dll_public:_void___thiscall_SOUI::TStringT_wchar_t__struct_SOUI::wchar_traits_::constructor_wchar_t_const__]
push str.check
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 1
call dword [sym.imp.utilities.dll_public:_void___thiscall_SOUI::TStringT_wchar_t__struct_SOUI::wchar_traits_::constructor_wchar_t_const__]
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x450]
mov edi, dword [sym.imp.soui.dll_public:_class_SOUI::SMenuExItem____thiscall_SOUI::SMenuEx::GetMenuItem_int_]
push 0xcc
call edi
push 0
lea ecx, [ebp - 0x458]
push ecx
mov edx, dword [eax]
lea ecx, [ebp - 0x1c]
push ecx
mov ecx, eax
call dword [edx + 0x10]
lea ecx, [ebp - 0x1c]
call dword [sym.imp.utilities.dll_public:_void___thiscall_SOUI::TStringT_wchar_t__struct_SOUI::wchar_traits_::destructor_void_]
lea ecx, [ebp - 0x458]
mov byte [ebp - 4], 0
call dword [sym.imp.utilities.dll_public:_void___thiscall_SOUI::TStringT_wchar_t__struct_SOUI::wchar_traits_::destructor_void_]
lea eax, [ebp - 0x28]
mov dword [ebp - 0x34], 0
lea ecx, [ebp - 0x34]
mov dword [ebp - 0x30], 2
push eax
xorps xmm0, xmm0
mov dword [ebp - 0x2c], 0xd
push ecx
lea ecx, [ebp - 0x28]
movq qword [ebp - 0x28], xmm0
call fcn.0041a7a0
mov ecx, dword [esi + 0x494]
lea eax, [ebp - 0x30]
xorps xmm0, xmm0
push eax
movq qword [ebp - 0x30], xmm0
call fcn.00406ce0
mov byte [ebp - 4], 4
mov ecx, dword [ebp - 0x28]
mov esi, dword [ebp - 0x30]
mov eax, dword [ecx + 4]
cmp byte [eax + 0xd], 0
jne 0x413979
mov edx, dword [esi + 0x3c]
cmp dword [eax + 0x10], edx
jge 0x41395f
mov eax, dword [eax + 8]
jmp 0x413963
mov ecx, eax
mov eax, dword [eax]
cmp byte [eax + 0xd], 0
je 0x413955
cmp ecx, dword [ebp - 0x28]
je 0x413979
cmp edx, dword [ecx + 0x10]
jl 0x413979
cmp dword [esi + 0x1c], 0
jne 0x41398e
push 0xcd
lea ecx, [ebp - 0x450]
call edi
mov ecx, eax
call dword [sym.imp.soui.dll_public:_int___thiscall_SOUI::SWindow::DestroyWindow_void_]
cmp dword [esi + 0x3c], 0xffffffff
je 0x4139a4
cmp dword [esi + 0x1c], 0
mov dword [ebp - 0x458], 0
jne 0x4139ae
mov dword [ebp - 0x458], 1
mov dword [ebp - 0x18], 0
cmp dword [esi + 0x14], 8
jb 0x4139bd
mov esi, dword [esi]
push esi
lea ecx, [ebp - 0x18]
call fcn.00401980
lea eax, [ebp - 0x50]
xorps xmm0, xmm0
push eax
push 0x4779f0
push 0x17
movups xmmword [ebp - 0x5c], xmm0
push 0
push 0x48a710
mov dword [ebp - 0x50], 0
mov dword [ebp - 0x5c], 0xffffffff
mov dword [ebp - 0x58], 0xffffffff
mov byte [ebp - 0x54], 0
call dword [sym.imp.ole32.dll_CoCreateInstance]
movzx ecx, byte [ebp - 0x54]
test eax, eax
mov edx, 1
cmovns ecx, edx
mov byte [ebp - 0x54], cl
mov byte [ebp - 4], 6
mov eax, dword [ebp - 0x18]
sub edx, dword [eax - 4]
mov ecx, dword [eax - 8]
or ecx, edx
jge 0x413a2d
push 0
lea ecx, [ebp - 0x18]
call fcn.004023a0
mov eax, dword [ebp - 0x18]
xor ecx, ecx
mov dword [ebp - 0x460], 7
mov dword [ebp - 0x464], 0
mov word [ebp - 0x474], cx
cmp word [eax], cx
jne 0x413a53
xor edx, edx
jmp 0x413a6f
mov edx, eax
lea esi, [edx + 2]
nop dword [eax + eax]
mov cx, word [edx]
add edx, 2
test cx, cx
jne 0x413a60
sub edx, esi
sar edx, 1
push edx
push eax
lea ecx, [ebp - 0x474]
call fcn.004215d0
lea eax, [ebp - 0x474]
mov byte [ebp - 4], 7
push eax
lea ecx, [ebp - 0x5c]
mov dword [ebp - 0x1c], 1
call fcn.004379f0
test al, al
je 0x413aaa
cmp dword [ebp - 0x458], 0
mov byte [ebp - 0x451], 0
je 0x413ab1
mov byte [ebp - 0x451], 1
mov dword [ebp - 4], 6
mov eax, dword [ebp - 0x460]
cmp eax, 8
jb 0x413ad6
inc eax
lea ecx, [ebp - 0x474]
push eax
push dword [ebp - 0x474]
call fcn.004085b0
cmp byte [ebp - 0x451], 0
je 0x413af4
push 0x818
lea ecx, [ebp - 0x450]
call edi
mov ecx, eax
call dword [sym.imp.soui.dll_public:_int___thiscall_SOUI::SWindow::DestroyWindow_void_]
mov ecx, dword [ebp - 0x45c]
lea eax, [ebp - 0x20]
xorps xmm0, xmm0
push eax
movq qword [ebp - 0x20], xmm0
mov ecx, dword [ecx + 0x494]
call fcn.00406ce0
xor eax, eax
mov dword [ebp - 0x38], 7
mov dword [ebp - 0x3c], 0
mov word [ebp - 0x4c], ax
mov byte [ebp - 4], 9
mov esi, dword [ebp - 0x20]
test esi, esi
setne al
test al, al
je 0x413b51
lea eax, [ebp - 0x4c]
cmp eax, esi
je 0x413b51
push 0xffffffffffffffff
push 0
push esi
mov ecx, eax
call fcn.00408490
cmp dword [ebp - 0x38], 8
mov eax, dword [ebp - 0x4c]
jae 0x413b54
lea eax, [ebp - 0x4c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x413c1f
cmp dword [ebp - 0x38], 8
lea edx, [ebp - 0x4c]
cmovae edx, dword [ebp - 0x4c]
sub esp, 0x18
mov ecx, esp
call fcn.0043abf0
call fcn.0043a920
add esp, 0x18
mov byte [ebp - 0x451], al
mov eax, dword [ebp - 0x45c]
push dword [esi + 0x40]
mov ecx, dword [eax + 0x494]
call fcn.00406fc0
cmp eax, 4
ja case.0x413ba3.1
jmp dword [eax*4 + 0x413d8c]
push 0
push 1
push 0xcb
lea ecx, [ebp - 0x450]
call edi
mov esi, dword [sym.imp.soui.dll_public:_void___thiscall_SOUI::SWindow::EnableWindow_int__int_]
mov ecx, eax
call esi
movzx eax, byte [ebp - 0x451]
lea ecx, [ebp - 0x450]
push 0
push eax
push 0xd1
call edi
mov ecx, eax
call esi
jmp case.0x413ba3.1
push 0
push 1
push 0xcb
lea ecx, [ebp - 0x450]
call edi
mov esi, dword [sym.imp.soui.dll_public:_void___thiscall_SOUI::SWindow::EnableWindow_int__int_]
mov ecx, eax
call esi
push 0
push 0
push 0xd1
lea ecx, [ebp - 0x450]
call edi
mov ecx, eax
call esi
jmp case.0x413ba3.1
push 0
push 0
push 0xcb
jmp 0x413c3d
push 0xcb
lea ecx, [ebp - 0x450]
call edi
mov ecx, eax
call dword [sym.imp.soui.dll_public:_int___thiscall_SOUI::SWindow::DestroyWindow_void_]
push 0
push 0
push 0xd1
lea ecx, [ebp - 0x450]
call edi
mov ecx, eax
call dword [sym.imp.soui.dll_public:_void___thiscall_SOUI::SWindow::EnableWindow_int__int_]
mov edi, dword [ebp - 0x45c]
lea eax, [ebx + 8]
push eax
push dword [edi + 0x25c]
call dword [sym.imp.USER32.dll_ClientToScreen]
mov eax, dword [edi]
mov ecx, edi
mov eax, dword [eax + 0x84]
call eax
push eax
push dword [edi + 0x25c]
lea ecx, [ebp - 0x450]
push dword [ebx + 0xc]
push dword [ebx + 8]
push 0
call dword [sym.imp.soui.dll_public:_unsigned_int___thiscall_SOUI::SMenuEx::TrackPopupMenu_unsigned_int__int__int__struct_HWND_____int_]
mov eax, dword [ebp - 0x38]
cmp eax, 8
jb 0x413c9f
inc eax
lea ecx, [ebp - 0x4c]
push eax
push dword [ebp - 0x4c]
call fcn.004085b0
xor eax, eax
mov dword [ebp - 0x38], 7
mov dword [ebp - 0x3c], 0
mov word [ebp - 0x4c], ax
mov byte [ebp - 4], 0xa
or edi, 0xffffffff
mov esi, dword [ebp - 0x1c]
test esi, esi
je 0x413ce0
mov eax, edi
lock xadd dword [esi + 4], eax
jne 0x413ce0
mov eax, dword [esi]
mov ecx, esi
call dword [eax]
mov eax, edi
lock xadd dword [esi + 8], eax
jne 0x413ce0
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 4]
mov byte [ebp - 4], 5
mov ecx, dword [ebp - 0x50]
test ecx, ecx
je 0x413cf1
mov eax, dword [ecx]
push ecx
call dword [eax + 8]
mov byte [ebp - 4], 4
mov eax, edi
mov edx, dword [ebp - 0x18]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x413d0f
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0xb
mov esi, dword [ebp - 0x2c]
test esi, esi
je 0x413d38
mov eax, edi
lock xadd dword [esi + 4], eax
jne 0x413d38
mov eax, dword [esi]
mov ecx, esi
call dword [eax]
lock xadd dword [esi + 8], edi
dec edi
jne 0x413d38
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 4]
mov eax, dword [ebp - 0x28]
lea ecx, [ebp - 0x458]
push eax
push dword [eax]
push ecx
lea ecx, [ebp - 0x28]
call fcn.0041bca0
push dword [ebp - 0x28]
call fcn.0043f53a
add esp, 4
lea ecx, [ebp - 0x450]
call dword [sym.imp.soui.dll_public_virtual:_void___thiscall_SOUI::SMenuEx::destructor_void_]
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0043f53f
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret 8