Function at 0x5057fb
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x34
mov ecx, dword [ebp + 8]
push ebx
push esi
push edi
push dword [ebp + 0xc]
call fcn.0050528e
mov dword [ebp - 8], eax
cmp eax, 0xffffffff
je 0x505a5e
mov ecx, dword [ebp + 8]
push eax
call fcn.005052ce
mov esi, eax
mov dword [ebp - 4], esi
test esi, esi
je 0x505a5e
push 0x79
push dword [0x6bb728]
call dword [sym.imp.USER32.dll_LoadMenuW]
mov dword [ebp - 0xc], eax
test eax, eax
je 0x505a5e
push 0
push eax
call dword [sym.imp.USER32.dll_GetSubMenu]
mov edi, eax
test edi, edi
je 0x505a5e
mov eax, dword [esi + 0x2c]
mov esi, dword [sym.imp.USER32.dll_EnableMenuItem]
push 3
cmp eax, 1
jne 0x50588f
push 0xa028
push edi
call esi
push 3
mov ebx, 0xa02a
push ebx
push edi
call esi
push 3
push ebx
push edi
call esi
push 3
push 0xa02d
jmp 0x505909
cmp eax, 2
jne 0x50589b
push 0xa029
jmp 0x505872
pop ebx
cmp eax, ebx
jne 0x5058b1
push ebx
push 0xa028
push edi
call esi
push ebx
push 0xa029
jmp 0x50591d
cmp eax, 4
je 0x5058e9
test eax, eax
je 0x5058e9
cmp eax, 5
jne 0x505920
push 3
pop ebx
push ebx
push 0xa028
push edi
call esi
push ebx
push 0xa029
push edi
call esi
push ebx
push 0xa02f
push edi
call esi
push ebx
push 0xa02b
push edi
call esi
push ebx
jmp 0x505918
push ebx
push 0xa029
push edi
call esi
push ebx
mov ebx, 0xa02a
push ebx
push edi
call esi
push 3
push ebx
push edi
call esi
push 3
push 0xa028
push edi
call esi
push 3
push 0xa02f
push edi
call esi
push 3
push 0xa032
push edi
call esi
mov eax, dword [ebp - 4]
cmp dword [eax + 0x148c], 0
jne 0x505936
push 3
push 0xa02c
push edi
call esi
mov eax, dword [ebp + 8]
cmp dword [eax + 0xa8], 0
jne 0x50594c
push 3
push 0xa032
push edi
call esi
and dword [ebp - 0x14], 0
and dword [ebp - 0x10], 0
push edi
lea eax, [ebp - 0x18]
mov dword [ebp - 0x18], 0x64b424
call fcn.004f9000
call dword [sym.imp.USER32.dll_GetForegroundWindow]
xor esi, esi
push esi
push esi
push esi
push esi
xor ebx, ebx
inc ebx
push ebx
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp - 0x14]
push eax
lea eax, [ebp - 0x18]
call fcn.004f95ed
mov edx, eax
cmp edx, esi
je 0x505a4d
xor eax, eax
push 6
pop ecx
lea edi, [ebp - 0x30]
rep stosd dword es:[edi], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x34], eax
lea eax, [edx - 0xa028]
mov dword [ebp - 0x1c], esi
cmp eax, 0xd
ja case.0x5059b2.41011
jmp dword [eax*4 + 0x505a67]
mov dword [ebp - 0x30], 0x52
jmp case.0x5059b2.41011
mov dword [ebp - 0x30], 0x51
jmp case.0x5059b2.41011
mov dword [ebp - 0x30], 0x4e
jmp case.0x5059b2.41011
mov dword [ebp - 0x30], 0x54
jmp case.0x5059b2.41011
mov dword [ebp - 0x30], 0x58
jmp case.0x5059b2.41011
mov dword [ebp - 0x30], 0x55
jmp case.0x5059b2.41011
mov dword [ebp - 0x30], 0x56
jmp case.0x5059b2.41011
mov dword [ebp - 0x30], 0x4f
mov esi, dword [ebp - 4]
lea eax, [esi + 0x34]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je case.0x5059b2.41011
push dword [ebp - 8]
mov ecx, dword [ebp + 8]
mov dword [esi + 0x30], ebx
call fcn.00506dc5
jmp case.0x5059b2.41011
mov dword [ebp - 0x30], 0x50
jmp 0x505a02
mov dword [ebp - 0x30], 0x4b4
jmp case.0x5059b2.41011
mov dword [ebp - 0x30], 0x57
jmp case.0x5059b2.41011
mov dword [ebp - 0x30], 0x4c8
lea eax, [ebp - 0x34]
call fcn.004f6907
push dword [ebp - 0xc]
call dword [sym.imp.USER32.dll_DestroyMenu]
lea ecx, [ebp - 0x18]
call fcn.0049ee09
pop edi
pop esi
pop ebx
leave
ret 0x10