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

Disassembly:
push ebp
lea ebp, [esp - 0x64]
sub esp, 0x64
push 0xffffffffffffffff
push 0x1010f16b
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xe0
mov ax, word [0x101227a0]
movq xmm0, qword [str.PatchFile]
push ebx
mov word [ebp - 0x2c], ax
mov ebx, ecx
xor eax, eax
mov dword [ebp + 0x44], ebx
push esi
push edi
movq qword [ebp - 0x34], xmm0
mov word [ebp - 0x2a], ax
mov dword [ebp + 0x40], eax
nop dword [eax + eax]
push 0xa
lea ecx, [ebp - 0x2b]
push ecx
push eax
call fcn.100f642a
add esp, 0xc
lea eax, [ebp - 0x34]
mov edx, str.ExtraPatches
lea ecx, [ebp + 0x24]
push 0x1011f824
push eax
call fcn.1000dd00
mov dword [ebp - 4], 0
cmp dword [ebp + 0x34], 0
je 0x10086041
lea ecx, [ebp + 0x24]
call fcn.10013bd0
test al, al
je 0x10086041
cmp dword [ebp + 0x38], 0x10
lea eax, [ebp + 0x24]
cmovae eax, dword [ebp + 0x24]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x10086041
mov edi, dword [ebp + 0x38]
lea ecx, [ebp + 0x24]
mov esi, dword [ebp + 0x24]
lea eax, [ebp + 0x3c]
mov edx, dword [ebp + 0x34]
lea ebx, [ebp + 0x24]
cmp edi, 0x10
mov dword [ebp + 0x3c], fcn.100efbf3
push eax
cmovae ecx, esi
cmovae ebx, esi
push ebx
lea edx, [edx + ecx]
lea ecx, [ebp + 0x24]
cmovae ecx, esi
call fcn.10014ae0
mov ebx, dword [ebp + 0x44]
lea eax, [ebp + 0x24]
push eax
mov ecx, ebx
call fcn.100147b0
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp + 0x38]
cmp edx, 0x10
jb 0x1008608e
mov ecx, dword [ebp + 0x24]
inc edx
push 1
call fcn.1000d8e0
jmp 0x1008608e
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp + 0x38]
cmp eax, 0x10
jb 0x1008608e
mov ecx, dword [ebp + 0x24]
inc eax
cmp eax, 0x1000
jb 0x10086085
test cl, 0x1f
jne 0x100862fa
mov eax, dword [ecx - 4]
cmp eax, ecx
jae 0x100862fa
sub ecx, eax
cmp ecx, 4
jb 0x100862fa
cmp ecx, 0x23
ja 0x100862fa
mov ecx, eax
push ecx
call fcn.100e9b71
add esp, 4
mov eax, dword [ebp + 0x40]
inc eax
mov dword [ebp + 0x40], eax
cmp eax, 0x64
jl 0x10085f90
sub esp, 0xc
lea ecx, [ebp - 0xec]
push str..modsmods_order.ini
call fcn.10006330
mov dword [ebp - 4], 1
cmp dword [ebp - 0x90], 0
je 0x10086398
mov dword [ebp + 0x5c], 0xf
mov dword [ebp + 0x58], 0
mov byte [ebp + 0x48], 0
lea edx, [ebp + 0x48]
mov byte [ebp - 4], 2
lea ecx, [ebp - 0xec]
call fcn.10009280
mov ecx, eax
mov eax, dword [ecx]
mov eax, dword [eax + 4]
test byte [eax + ecx + 0xc], 6
jne 0x10086385
nop dword [eax + eax]
xor ecx, ecx
mov eax, 2
cmp byte [0x1011f7c0], cl
cmove eax, ecx
lea ecx, [ebp + 0x48]
push eax
sub esp, 8
call fcn.100078a0
cmp eax, 0xffffffff
je 0x1008613c
cmp dword [ebp + 0x58], eax
jb 0x10086531
cmp dword [ebp + 0x5c], 0x10
lea ecx, [ebp + 0x48]
mov dword [ebp + 0x58], eax
cmovae ecx, dword [ebp + 0x48]
mov byte [ecx + eax], 0
mov esi, dword [ebp + 0x58]
mov ecx, dword [ebp + 0x5c]
mov edx, dword [ebp + 0x48]
mov byte [ebp + 0x60], 0x20
test esi, esi
je 0x1008618a
cmp ecx, 0x10
lea edi, [ebp + 0x48]
cmovae edi, edx
add edi, esi
cmp ecx, 0x10
lea esi, [ebp + 0x48]
cmovae esi, edx
cmp esi, edi
jae 0x1008618a
movsx eax, byte [esi]
push 1
push eax
lea eax, [ebp + 0x60]
push eax
call fcn.100ec180
add esp, 0xc
test eax, eax
je 0x100862ff
inc esi
cmp esi, edi
jb 0x10086165
mov ecx, dword [ebp + 0x5c]
mov edx, dword [ebp + 0x48]
cmp ecx, 0x10
mov dword [ebp + 0x58], 0
lea eax, [ebp + 0x48]
cmovae eax, edx
mov byte [eax], 0
mov edx, dword [ebp + 0x48]
mov ecx, dword [ebp + 0x5c]
mov esi, dword [ebp + 0x58]
test esi, esi
je 0x10086365
cmp ecx, 0x10
lea eax, [ebp + 0x48]
lea ebx, [ebp + 0x48]
cmovae eax, edx
mov dword [ebp + 0x3c], eax
lea eax, [ebp + 0x48]
cmovae eax, edx
add eax, esi
cmp ecx, 0x10
mov edi, eax
cmovae ebx, edx
xor ecx, ecx
sub edi, ebx
xor esi, esi
cmp ebx, eax
cmova edi, ecx
test edi, edi
je 0x100861f8
nop dword [eax]
movsx eax, byte [ebx + esi]
push eax
call fcn.100efbf3
mov ecx, dword [ebp + 0x3c]
add esp, 4
mov byte [ecx + esi], al
inc esi
cmp esi, edi
jne 0x100861e0
push 1
push 0
lea eax, [ebp + 0x60]
mov byte [ebp + 0x60], 0x3d
push eax
lea ecx, [ebp + 0x48]
call fcn.10007920
mov esi, eax
cmp esi, 0xffffffff
je 0x10086424
push 0xffffffffffffffff
lea eax, [esi + 1]
push eax
lea eax, [ebp - 0x24]
push eax
lea ecx, [ebp + 0x48]
call fcn.100061e0
push eax
lea eax, [ebp + 0x24]
mov byte [ebp - 4], 3
push eax
call fcn.10013ad0
mov byte [ebp - 4], 5
mov edx, dword [ebp - 0x10]
cmp edx, 0x10
jb 0x1008624e
mov ecx, dword [ebp - 0x24]
inc edx
push 1
call fcn.1000d8e0
mov dword [ebp - 0x10], 0xf
mov dword [ebp - 0x14], 0
mov byte [ebp - 0x24], 0
cmp dword [ebp + 0x58], esi
jb 0x10086531
cmp dword [ebp + 0x5c], 0x10
lea eax, [ebp + 0x48]
mov dword [ebp + 0x58], esi
lea ecx, [ebp + 0x24]
cmovae eax, dword [ebp + 0x48]
mov edx, 1
mov byte [eax + esi], 0
mov edi, dword [ebp + 0x38]
cmp edi, 0x10
mov eax, dword [ebp + 0x24]
mov ebx, dword [ebp + 0x34]
cmovae ecx, eax
cmp ebx, edx
cmovb edx, ebx
test edx, edx
je 0x1008633e
mov esi, 0x10125220
sub edx, 4
jb 0x100862c1
nop dword [eax]
mov eax, dword [ecx]
cmp eax, dword [esi]
jne 0x100862c6
add ecx, 4
add esi, 4
sub edx, 4
jae 0x100862b0
cmp edx, 0xfffffffc
je 0x10086331
mov al, byte [ecx]
cmp al, byte [esi]
jne 0x100862f3
cmp edx, 0xfffffffd
je 0x10086331
mov al, byte [ecx + 1]
cmp al, byte [esi + 1]
jne 0x100862f3
cmp edx, 0xfffffffe
je 0x10086331
mov al, byte [ecx + 2]
cmp al, byte [esi + 2]
jne 0x100862f3
cmp edx, 0xffffffff
je 0x10086331
mov al, byte [ecx + 3]
cmp al, byte [esi + 3]
je 0x10086331
sbb eax, eax
or eax, 1
jmp 0x10086333
call fcn.100efe2d
mov ecx, dword [ebp + 0x5c]
lea eax, [ebp + 0x48]
mov edx, dword [ebp + 0x48]
cmp ecx, 0x10
cmovae eax, edx
sub esi, eax
cmp esi, 0xffffffff
je 0x1008618a
test esi, esi
je 0x100861a3
push esi
push 0
lea ecx, [ebp + 0x48]
call fcn.1000d790
jmp 0x1008619d
xor eax, eax
test eax, eax
jne 0x1008640e
mov eax, dword [ebp + 0x24]
cmp ebx, 1
jb 0x1008640e
ja 0x1008640e
mov byte [ebp - 4], 2
cmp edi, 0x10
jb 0x10086362
push 1
lea edx, [edi + 1]
mov ecx, eax
call fcn.1000d8e0
mov ebx, dword [ebp + 0x44]
lea edx, [ebp + 0x48]
lea ecx, [ebp - 0xec]
call fcn.10009280
mov ecx, eax
mov eax, dword [ecx]
mov eax, dword [eax + 4]
test byte [eax + ecx + 0xc], 6
je 0x10086100
mov edx, dword [ebp + 0x5c]
cmp edx, 0x10
jb 0x10086398
mov ecx, dword [ebp + 0x48]
inc edx
push 1
call fcn.1000d8e0
mov ecx, dword [ebx + 4]
mov eax, 0x2aaaaaab
sub ecx, dword [ebx]
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
mov edx, 0
mov dword [ebp + 0x18], eax
mov dword [ebp + 0x3c], edx
je 0x1008659b
mov ecx, dword [ebp + 0x18]
dec eax
xor ebx, ebx
mov dword [ebp - 0x28], eax
mov dword [ebp + 0x40], ebx
nop dword [eax + eax]
cmp eax, edx
jbe 0x10086589
lea ecx, [eax + eax*2]
shl ecx, 3
sub eax, edx
mov dword [ebp + 0x20], ecx
mov dword [ebp + 0x1c], eax
mov eax, dword [ebp + 0x44]
mov eax, dword [eax]
cmp dword [ecx + eax + 0x14], 0x10
lea edx, [ecx + eax]
lea edi, [edx + 0x10]
lea esi, [ebx + eax]
jb 0x100863fd
mov edx, dword [edx]
cmp dword [esi + 0x14], 0x10
jb 0x1008653b
mov ecx, dword [esi]
jmp 0x1008653d
mov byte [ebp - 4], 2
cmp edi, 0x10
jb 0x10086424
mov ecx, dword [ebp + 0x24]
lea edx, [edi + 1]
push 1
call fcn.1000d8e0
lea ecx, [ebp + 0x48]
call fcn.10013bd0
test al, al
je 0x10086362
lea eax, [ebp + 0x48]
mov edx, str..mods_
push eax
lea ecx, [ebp]
call fcn.10086800
mov ebx, dword [ebp + 0x44]
mov eax, 0x2aaaaaab
mov byte [ebp - 4], 6
mov ecx, dword [ebx + 4]
sub ecx, dword [ebx]
imul ecx
sar edx, 2
mov edi, edx
shr edi, 0x1f
add edi, edx
je 0x10086492
xor esi, esi
mov ecx, dword [ebx]
add ecx, esi
cmp dword [ecx + 0x14], 0x10
jb 0x10086472
mov ecx, dword [ecx]
cmp dword [ebp + 0x14], 0x10
lea eax, [ebp]
push ecx
cmovae eax, dword [ebp]
add eax, 2
push eax
call fcn.100efeb8
add esp, 8
add esi, 0x18
sub edi, 1
jne 0x10086466
cmp dword [ebp + 0x14], 0x10
lea eax, [ebp]
cmovae eax, dword [ebp]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x100864c9
mov byte [ebp - 4], 2
mov edx, dword [ebp + 0x14]
cmp edx, 0x10
jb 0x10086365
mov ecx, dword [ebp]
inc edx
push 1
call fcn.1000d8e0
jmp 0x10086365
cmp dword [ebp + 0x14], 0x10
lea edx, [ebp]
mov dword [ebp - 0x10], 0xf
cmovae edx, dword [ebp]
add edx, 2
mov dword [ebp - 0x14], 0
mov byte [ebp - 0x24], 0
cmp byte [edx], 0
jne 0x100864f2
xor ecx, ecx
jmp 0x10086500
mov ecx, edx
lea esi, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x100864f7
sub ecx, esi
push ecx
push edx
lea ecx, [ebp - 0x24]
call fcn.1000d690
lea eax, [ebp - 0x24]
mov byte [ebp - 4], 7
push eax
mov ecx, ebx
call fcn.10086780
mov edx, dword [ebp - 0x10]
cmp edx, 0x10
jb 0x100864a9
mov ecx, dword [ebp - 0x24]
inc edx
push 1
call fcn.1000d8e0
jmp 0x100864a9
push str.invalid_string_position
call fcn.100e89d8
mov ecx, esi
mov edi, dword [edi]
mov eax, edi
mov ebx, dword [esi + 0x10]
cmp ebx, edi
cmovb eax, ebx
push eax
call fcn.1000d020
add esp, 4
test eax, eax
jne 0x1008656a
cmp ebx, edi
jb 0x1008656a
ja 0x1008656a
cmp dword [esi + 0x14], 0x10
mov dword [esi + 0x10], eax
jb 0x10086567
mov esi, dword [esi]
mov byte [esi], 0
mov ecx, dword [ebp + 0x20]
mov ebx, dword [ebp + 0x40]
sub ecx, 0x18
sub dword [ebp + 0x1c], 1
mov dword [ebp + 0x20], ecx
jne 0x100863e6
mov edx, dword [ebp + 0x3c]
mov eax, dword [ebp - 0x28]
mov ecx, dword [ebp + 0x18]
inc edx
add ebx, 0x18
mov dword [ebp + 0x3c], edx
mov dword [ebp + 0x40], ebx
cmp edx, ecx
jb 0x100863d0
lea ecx, [ebp - 0xec]
call fcn.10005390
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
lea esp, [ebp + 0x64]
pop ebp
ret