Function at 0x498fe0
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x49a8cd
mov eax, dword fs:[0]
push eax
sub esp, 0x26c
mov eax, dword [0x4c1600]
xor eax, ebp
mov dword [ebp - 0x1c], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], 0
mov ecx, dword [ebp + 8]
call fcn.00401060
movzx eax, al
test eax, eax
jne 0x4993e1
lea ecx, [ebp - 0x18]
call fcn.00401080
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x14]
call fcn.00401080
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x14]
call fcn.00401060
movzx ecx, al
test ecx, ecx
je 0x499076
mov edx, dword [ebp + 8]
push edx
lea ecx, [ebp - 0x14]
call fcn.00401140
lea ecx, [ebp - 0x14]
call fcn.0041b0d0
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x499076
lea ecx, [ebp - 0x14]
call fcn.004020c0
lea ecx, [ebp - 0x14]
call fcn.00401060
movzx eax, al
test eax, eax
je 0x4991bc
cmp dword [ebp + 0xc], 0
jne 0x4991bc
mov word [ebp - 0x22c], 0
push 0x20a
push 0
lea ecx, [ebp - 0x22a]
push ecx
call fcn.00452150
add esp, 0xc
push 0x104
lea edx, [ebp - 0x22c]
push edx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea eax, [ebp - 0x22c]
std
invalid
call dword [eax - 0x73]
dec ebp
call 0xf6ca1cbc
jmp [edx + 0x5c]
lea ecx, [ebp - 0x18]
call fcn.004011a0
mov dword [ebp - 0x230], eax
cmp dword [ebp - 0x230], 0xffffffff
je 0x49913b
mov ecx, dword [ebp - 0x230]
add ecx, 1
push ecx
lea edx, [ebp - 0x234]
push edx
lea ecx, [ebp - 0x18]
call fcn.004011f0
mov dword [ebp - 0x24c], eax
mov eax, dword [ebp - 0x24c]
mov dword [ebp - 0x250], eax
mov byte [ebp - 4], 2
mov ecx, dword [ebp - 0x250]
push ecx
lea ecx, [ebp - 0x18]
call fcn.00401140
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x234]
call fcn.0040a1f0
lea ecx, [ebp - 0x18]
call fcn.00401060
movzx edx, al
test edx, edx
jne 0x4991bc
lea eax, [ebp - 0x18]
push eax
call fcn.00498e00
add esp, 4
mov ecx, dword [ebp + 8]
push ecx
lea edx, [ebp - 0x18]
push edx
lea eax, [ebp - 0x238]
push eax
call fcn.00401270
add esp, 0xc
mov dword [ebp - 0x254], eax
mov ecx, dword [ebp - 0x254]
mov dword [ebp - 0x258], ecx
mov byte [ebp - 4], 3
mov edx, dword [ebp - 0x258]
push edx
lea ecx, [ebp - 0x14]
call fcn.00401140
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x238]
call fcn.0040a1f0
lea ecx, [ebp - 0x14]
call fcn.0041b0d0
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x4991bc
lea ecx, [ebp - 0x14]
call fcn.004020c0
lea ecx, [ebp - 0x14]
call fcn.00401060
movzx eax, al
test eax, eax
je 0x49929b
lea ecx, [ebp - 0x18]
call fcn.004020c0
lea ecx, [ebp - 0x23c]
push ecx
call fcn.00498f10
add esp, 4
mov dword [ebp - 0x25c], eax
mov edx, dword [ebp - 0x25c]
mov dword [ebp - 0x260], edx
mov byte [ebp - 4], 4
mov eax, dword [ebp - 0x260]
push eax
lea ecx, [ebp - 0x18]
call fcn.00401140
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x23c]
call fcn.0040a1f0
lea ecx, [ebp - 0x18]
call fcn.00401060
movzx ecx, al
test ecx, ecx
jne 0x49929b
lea edx, [ebp - 0x18]
push edx
call fcn.00498e00
add esp, 4
mov eax, dword [ebp + 8]
push eax
lea ecx, [ebp - 0x18]
push ecx
lea edx, [ebp - 0x240]
push edx
call fcn.00401270
add esp, 0xc
mov dword [ebp - 0x264], eax
mov eax, dword [ebp - 0x264]
mov dword [ebp - 0x268], eax
mov byte [ebp - 4], 5
mov ecx, dword [ebp - 0x268]
push ecx
lea ecx, [ebp - 0x14]
call fcn.00401140
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x240]
call fcn.0040a1f0
lea ecx, [ebp - 0x14]
call fcn.0041b0d0
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x49929b
lea ecx, [ebp - 0x14]
call fcn.004020c0
lea ecx, [ebp - 0x14]
call fcn.00401060
movzx edx, al
test edx, edx
je 0x49937a
lea ecx, [ebp - 0x18]
call fcn.004020c0
lea eax, [ebp - 0x244]
push eax
call fcn.00498e40
add esp, 4
mov dword [ebp - 0x26c], eax
mov ecx, dword [ebp - 0x26c]
mov dword [ebp - 0x270], ecx
mov byte [ebp - 4], 6
mov edx, dword [ebp - 0x270]
push edx
lea ecx, [ebp - 0x18]
call fcn.00401140
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x244]
call fcn.0040a1f0
lea ecx, [ebp - 0x18]
call fcn.00401060
movzx eax, al
test eax, eax
jne 0x49937a
lea ecx, [ebp - 0x18]
push ecx
call fcn.00498e00
add esp, 4
mov edx, dword [ebp + 8]
push edx
lea eax, [ebp - 0x18]
push eax
lea ecx, [ebp - 0x248]
push ecx
call fcn.00401270
add esp, 0xc
mov dword [ebp - 0x274], eax
mov edx, dword [ebp - 0x274]
mov dword [ebp - 0x278], edx
mov byte [ebp - 4], 7
mov eax, dword [ebp - 0x278]
push eax
lea ecx, [ebp - 0x14]
call fcn.00401140
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x248]
call fcn.0040a1f0
lea ecx, [ebp - 0x14]
call fcn.0041b0d0
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x49937a
lea ecx, [ebp - 0x14]
call fcn.004020c0
lea ecx, [ebp - 0x14]
call fcn.00401060
movzx ecx, al
test ecx, ecx
jne 0x4993ae
lea ecx, [ebp - 0x14]
call fcn.0041b0d0
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x4993ae
lea ecx, [ebp - 0x14]
call fcn.0041b0d0
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jne 0x4993c6
mov ecx, dword [ebp + 8]
call fcn.0041b0d0
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov dword [ebp - 0x10], eax
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x14]
call fcn.0040a1f0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x18]
call fcn.0040a1f0
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x1c]
xor ecx, ebp
call fcn.00451d4e
mov esp, ebp
pop ebp
ret