Function at 0x1004cfed
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x100a44e5
mov eax, dword fs:[0]
push eax
sub esp, 0x30
push ebx
push esi
push edi
mov eax, dword [0x100b8210]
xor eax, esp
push eax
lea eax, [esp + 0x40]
mov dword fs:[0], eax
mov edi, dword [ebp + 8]
mov eax, dword [edi + 4]
xor ebx, ebx
cmp eax, ebx
je 0x1004d22a
push ebx
push 0x100c04c8
mov esi, 0x100c0488
push esi
push ebx
push eax
call fcn.10091ce6
add esp, 0x14
mov dword [esp + 0x18], eax
cmp eax, ebx
jne 0x1004d04e
mov al, 1
jmp 0x1004d22c
push ebx
push 0x100c05a0
push esi
push ebx
push dword [edi + 4]
call fcn.10091ce6
add esp, 0x14
cmp eax, ebx
je 0x1004d071
mov edx, dword [eax]
push ebx
mov ecx, eax
call dword [edx + 4]
test al, al
je 0x1004d047
lea eax, [esp + 0x14]
push eax
mov eax, dword [esp + 0x1c]
call fcn.1003a6d8
push dword [eax]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
call fcn.10082afb
cmp dword [esp + 0x1c], ebx
je 0x1004d1f4
push ebx
push 0x100c05c4
push esi
push ebx
push dword [edi + 4]
call fcn.10091ce6
mov edi, eax
add esp, 0x14
cmp edi, ebx
je 0x1004d047
lea eax, [esp + 0x14]
push eax
mov eax, dword [esp + 0x1c]
call fcn.1003a6d8
mov dword [esp + 0x48], ebx
cmp byte [ebp + 0xc], bl
je 0x1004d18d
lea esi, [esp + 0x20]
mov eax, edi
call fcn.10036a4a
mov esi, eax
lea eax, [esp + 0x1c]
push eax
mov eax, dword [esp + 0x1c]
mov byte [esp + 0x4c], 1
call fcn.1003a6f2
push dword [ebp + 0x14]
mov byte [esp + 0x4c], 2
mov ecx, dword [edi + 0x10]
mov edi, dword [edi + 0x14]
push edi
push ecx
lea ecx, [esp + 0x20]
push ecx
push eax
mov eax, esi
lea esi, [esp + 0x38]
call fcn.1004ccc5
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
call fcn.10082afb
mov byte [esp + 0x48], 5
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
call fcn.10082afb
mov ecx, esi
call fcn.1004ccfb
mov esi, dword [ebp + 0x14]
cmp eax, ebx
jge 0x1004d16a
push eax
push dword [esp + 0x18]
push 0x1000d838
push 7
call fcn.10026c05
mov eax, dword [esp + 0x48]
add esp, 0x10
add eax, 0xfffffff0
call fcn.10082afb
mov eax, dword [esp + 0x14]
jmp 0x1004d222
push dword [esp + 0x14]
push 0x1000d920
push 4
call fcn.10026c05
mov byte [esp + 0x54], bl
mov eax, dword [esp + 0x44]
add esp, 0xc
add eax, 0xfffffff0
call fcn.10082afb
cmp byte [ebp + 0x10], bl
je 0x1004d1e3
lea eax, [esp + 0x20]
push eax
mov eax, dword [esp + 0x1c]
call fcn.1003a6d8
push dword [ebp + 0x14]
mov byte [esp + 0x4c], 6
call fcn.1004d241
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
call fcn.10082afb
cmp dword [esp + 0x18], 0xffffffff
je 0x1004d161
mov edi, dword [ebp + 8]
mov esi, dword [edi + 4]
mov eax, dword [esi + 0xc]
cmp eax, ebx
je 0x1004d1d8
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x18]
mov dword [esi + 0xc], eax
mov byte [edi + 8], 1
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
call fcn.10082afb
jmp 0x1004d047
lea eax, [esp + 0x20]
push eax
mov eax, dword [esp + 0x1c]
call fcn.1003a6d8
mov esi, dword [ebp + 0x14]
mov dword [esp + 0x48], 7
push dword [eax]
push 0x1000d968
push 4
call fcn.10026c05
mov eax, dword [esp + 0x2c]
add esp, 0xc
add eax, 0xfffffff0
call fcn.10082afb
xor al, al
mov ecx, dword [esp + 0x40]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10