Function at 0x436530
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [0x5ca120]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 0x1c]
xor ebx, ebx
push edi
mov dword [ebp - 0xc], ecx
cmp esi, ebx
je 0x436683
cmp word [esi], bx
je 0x436683
push esi
mov dword [ebp - 8], ebx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x436579
push 2
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x4367fc
push esi
call dword [sym.imp.SHLWAPI.dll_PathIsDirectoryW]
test eax, eax
jne 0x43659a
push esi
mov dword [ebp - 8], esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
inc eax
cmp eax, 0x3fffffff
jle 0x4365c5
xor eax, eax
jmp 0x4365db
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
inc eax
cmp eax, 0x3fffffff
jg 0x4365c1
lea edi, [eax + eax]
mov eax, edi
call fcn.00544cf0
mov eax, esp
push 3
push edi
push esi
push eax
call fcn.004364e0
mov ebx, eax
xor eax, eax
jmp 0x4365db
lea edi, [eax + eax]
mov eax, edi
call fcn.00544cf0
mov eax, esp
push 3
push edi
push esi
push eax
call fcn.004364e0
mov edi, dword [ebp + 8]
push ebx
push eax
push edi
call fcn.0043ed50
add esp, 0xc
test eax, eax
jne 0x4365fc
push 0xd
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x4367fc
push edi
call fcn.0043ed40
add esp, 4
test eax, eax
jne 0x43661b
push 0x65b
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x4367fc
mov eax, dword [ebp - 0xc]
cmp dword [eax + 8], 1
jne 0x436683
test byte [ebp + 0xc], 1
je 0x436683
mov ebx, dword [ebp - 8]
test ebx, ebx
je 0x436683
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
inc eax
cmp eax, 0x3fffffff
jle 0x436644
xor eax, eax
jmp 0x43665a
lea esi, [eax + eax]
mov eax, esi
call fcn.00544cf0
mov eax, esp
push 3
push esi
push ebx
push eax
call fcn.004364e0
push eax
call fcn.004425d0
add esp, 4
test eax, eax
jne 0x436679
push 0x10d2
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x4367fc
push eax
push edi
call fcn.00442430
add esp, 8
mov esi, dword [ebp + 0x10]
test esi, esi
je 0x4367f7
cmp word [esi], 0
je 0x4367f7
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x43656a
push esi
call dword [sym.imp.SHLWAPI.dll_PathIsDirectoryW]
test eax, eax
jne 0x43656a
mov ebx, dword [ebp + 0x14]
test ebx, ebx
je 0x43656a
cmp word [ebx], ax
je 0x43656a
push ebx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x43656a
push ebx
call dword [sym.imp.SHLWAPI.dll_PathIsDirectoryW]
test eax, eax
jne 0x43656a
mov edi, dword [ebp + 0x18]
push edi
call fcn.0042ddb0
add esp, 4
test eax, eax
je 0x436755
test edi, edi
jne 0x43670d
mov edi, dword [ebp + 8]
xor eax, eax
push eax
push edi
call fcn.0043e670
add esp, 8
jmp 0x436758
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
inc eax
cmp eax, 0x3fffffff
jle 0x43672d
mov edi, dword [ebp + 8]
xor eax, eax
push eax
push edi
call fcn.0043e670
add esp, 8
jmp 0x436758
lea esi, [eax + eax]
mov eax, esi
call fcn.00544cf0
mov eax, esp
push 3
push esi
push edi
push eax
call fcn.004364e0
mov edi, dword [ebp + 8]
mov esi, dword [ebp + 0x10]
push eax
push edi
call fcn.0043e670
add esp, 8
jmp 0x436758
mov edi, dword [ebp + 8]
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
inc eax
cmp eax, 0x3fffffff
jle 0x43676b
xor eax, eax
jmp 0x436784
lea esi, [eax + eax]
mov eax, esi
call fcn.00544cf0
mov eax, esp
push 3
push esi
push ebx
push eax
call fcn.004364e0
mov esi, dword [ebp + 0x10]
push 1
push eax
push edi
call fcn.00441300
add esp, 0xc
test eax, eax
jne 0x4367a0
push 0x56
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x4367fc
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
inc eax
cmp eax, 0x3fffffff
jle 0x4367b3
xor eax, eax
jmp 0x4367cc
lea esi, [eax + eax]
mov eax, esi
call fcn.00544cf0
mov ecx, dword [ebp + 0x10]
mov eax, esp
push 3
push esi
push ecx
push eax
call fcn.004364e0
push eax
push edi
call fcn.00441f60
add esp, 8
test eax, eax
je 0x4365ed
push edi
call fcn.0043d280
add esp, 4
test eax, eax
jne 0x4367f7
push 0xc
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x4367fc
mov eax, 1
lea esp, [ebp - 0x18]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005448c8
mov esp, ebp
pop ebp
ret 0x18