Function at 0x1013f48
Capabilities:
Check if file exists
Get file attributes

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x224
mov eax, dword [0x1020204]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
or dword [ebp - 0x218], 0xffffffff
push ebx
xor ebx, ebx
cmp dword [0x1021184], ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov dword [ebp - 0x21c], eax
mov dword [ebp - 0x214], ebx
mov dword [ebp - 0x210], ebx
jne 0x1013fa0
cmp edi, ebx
je 0x1013f98
cmp byte [edi], 0x2f
jne 0x1013f98
cmp byte [edi + 1], 0x2f
je 0x1013fa0
mov dword [ebp - 0x220], ebx
jmp 0x1013faa
mov dword [ebp - 0x220], 1
cmp eax, ebx
mov byte [ebp - 0x20c], bl
mov byte [ebp - 0x108], bl
jne 0x1013fc6
lea eax, [ebp - 0x224]
mov dword [ebp - 0x21c], eax
push 0x524
mov dword [eax], 0x2b3
push dword [0x1021d74]
call fcn.01018604
mov esi, eax
cmp esi, ebx
jne 0x1013fe9
xor eax, eax
jmp 0x10143f0
cmp edi, ebx
jne 0x1013ff2
mov edi, 0x1001950
cmp dword [ebp - 0x220], 0
mov ebx, 0x104
push edi
je 0x1014022
push ebx
push esi
call fcn.0101627b
add esp, 0xc
push 0x2f
push esi
call fcn.0100e5cd
mov edi, eax
test edi, edi
je 0x10143bb
mov byte [edi], 0
jmp 0x1014071
call fcn.0100943a
test eax, eax
je 0x1014038
push edi
push ebx
push esi
call fcn.0101627b
add esp, 0xc
jmp 0x101406b
push 0x5c
push edi
call fcn.0100e5cd
test eax, eax
mov dword [ebp - 0x210], eax
jne 0x1014061
push 0x1001950
push ebx
push esi
call fcn.0101627b
add esp, 0xc
mov dword [ebp - 0x210], edi
jmp 0x101406b
sub eax, edi
push eax
push edi
push esi
call fcn.0100e562
mov edi, dword [ebp - 0x214]
mov eax, 0x10022c0
mov ax, word [eax]
cmp ax, word [esi]
jne 0x1014088
mov dword [esi + 0x518], 1
xor eax, eax
cmp dword [ebp - 0x220], eax
jne 0x10140ba
cmp dword [0x1021184], eax
jne 0x10140ba
cmp dword [0x1021188], eax
je 0x10140b2
cmp dword [0x1021180], eax
jne 0x10140b2
mov dword [esi + 0x51c], eax
jmp 0x10140cc
mov eax, dword [esi + 0x518]
jmp 0x10140aa
cmp dword [ebp - 0x220], eax
mov dword [esi + 0x51c], eax
jne 0x101421a
push esi
lea eax, [ebp - 0x20c]
push ebx
push eax
call fcn.0101627b
mov eax, esi
add esp, 0xc
lea edi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x10140e2
sub eax, edi
cmp byte [eax + esi - 1], 0x5c
je 0x1014107
push 0x1001914
lea eax, [ebp - 0x20c]
push ebx
push eax
call fcn.01016202
add esp, 0xc
push ebx
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.msvcrt.dll__fullpath]
add esp, 0xc
test eax, eax
je 0x10143bb
lea eax, [ebp - 0x108]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x1014130
sub eax, edx
cmp dword [0x102117c], 0
lea edi, [ebp + eax - 0x108]
jne 0x101421a
push 0x100193c
push ebx
push edi
call fcn.0101627b
add esp, 0xc
xor eax, eax
push eax
push eax
push 3
push eax
push 1
push 0x80000000
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edx, eax
cmp edx, 0xffffffff
mov dword [ebp - 0x218], edx
jne 0x101432d
jmp 0x101421a
push 0x10022b8
push 7
push edi
call fcn.0101627b
add esp, 0xc
xor eax, eax
push eax
push eax
push 3
push eax
push 1
push 0x80000000
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [ebp - 0x218], eax
jne 0x1014230
mov byte [edi], 0
mov cl, byte [ebp - 0x108]
xor edi, edi
test cl, cl
lea eax, [ebp - 0x108]
je 0x10142ed
cmp cl, 0x5c
jne 0x10141ef
mov cl, byte [eax + 1]
test cl, cl
je 0x10141ef
cmp cl, 0x5c
je 0x10141ef
mov edi, eax
inc eax
mov cl, byte [eax]
test cl, cl
jne 0x10141dc
test edi, edi
je 0x10142ed
lea eax, [ebp - 0x108]
push eax
mov byte [edi], cl
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x10142ed
mov byte [edi], 0x5c
inc edi
lea eax, [ebp - 0x108]
cmp edi, eax
mov byte [edi], 0
ja 0x101418d
jmp 0x10142ed
cmp dword [esi + 0x51c], 0
je 0x10142ac
cmp byte [0x10215d0], 0
je 0x1014266
push 0x10215d0
lea eax, [esi + 0x104]
push ebx
push eax
call fcn.0101627b
add esp, 0xc
lea eax, [esi + 0x104]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
jmp 0x101428f
lea eax, [ebp - 0x108]
push eax
lea eax, [esi + 0x104]
push ebx
push eax
call fcn.0101627b
mov eax, edi
lea ecx, [ebp - 0x108]
add esp, 0xc
sub eax, ecx
mov byte [eax + esi + 0x104], 0
test eax, eax
jl 0x10142ac
add eax, esi
cmp byte [eax + 0x103], 0x5c
je 0x10142ac
mov byte [eax + 0x104], 0x5c
mov byte [eax + 0x105], 0
mov eax, dword [0x1021188]
neg eax
sbb eax, eax
not eax
lea ecx, [ebp - 0x108]
and eax, ecx
push eax
mov byte [edi], 0
call fcn.01013c50
test eax, eax
mov dword [esi + 0x520], eax
jne 0x10142e3
push dword [ebp - 0x218]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x10143bb
mov dword [esi + 0x514], 1
xor eax, eax
cmp dword [esi + 0x514], eax
jne 0x101431e
cmp dword [0x102117c], eax
je 0x101431e
push eax
call fcn.01013c50
test eax, eax
mov dword [esi + 0x520], eax
je 0x101431e
xor eax, eax
inc eax
mov dword [esi + 0x514], eax
mov dword [ebp - 0x214], eax
mov edx, dword [ebp - 0x218]
cmp edx, 0xffffffff
je 0x10143b2
mov ecx, esi
call fcn.01013085
cmp dword [ebp - 0x210], 0
mov dword [ebp - 0x214], eax
je 0x10143a6
push 0x2a
push dword [ebp - 0x210]
call fcn.0100e51e
test eax, eax
jne 0x1014365
push 0x3f
push dword [ebp - 0x210]
call fcn.0100e51e
test eax, eax
je 0x10143a6
lea edi, [esi + 0x208]
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
cmp byte [eax + esi + 0x207], 0x5c
je 0x1014396
mov eax, dword [ebp - 0x210]
cmp byte [eax], 0x5c
je 0x1014396
push 0x1001914
push ebx
push edi
call fcn.01016202
add esp, 0xc
push dword [ebp - 0x210]
push ebx
push edi
call fcn.01016202
add esp, 0xc
push dword [ebp - 0x218]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x214], 0
jne 0x10143e5
cmp dword [esi + 0x514], 0
je 0x10143d0
mov eax, dword [ebp - 0x21c]
mov dword [eax], 0x325
push 0x524
push esi
push dword [0x1021d74]
call fcn.01018410
xor esi, esi
jmp 0x10143ee
mov eax, dword [ebp - 0x21c]
and dword [eax], 0
mov eax, esi
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.01015dd4
leave
ret 8