Function at 0x10031a00
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x100befd1
mov eax, dword fs:[0]
push eax
sub esp, 0x15c
mov eax, dword [0x100fe39c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, dword [ebp + 8]
mov eax, esi
mov ebx, dword [ebp + 0xc]
mov dword [ebp - 0x164], ebx
cmp dword [esi + 0x14], 8
jb 0x10031a44
mov eax, dword [esi]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x10031c70
cmp dword [ebx + 0x10], 0
lea eax, [ebx + 0x10]
mov dword [ebp - 0x15c], eax
je 0x10031c70
push 0xff
lea eax, [ebp - 0x110]
push 0
push eax
call fcn.10087da0
add esp, 0xc
cmp dword [esi + 0x14], 8
jb 0x10031a84
mov esi, dword [esi]
push 0xff
lea eax, [ebp - 0x110]
push eax
push esi
call fcn.10066c90
add esp, 0xc
cmp eax, 1
jne 0x10031c70
push 0xfde9
lea eax, [ebp - 0x110]
push eax
lea eax, [ebp - 0x158]
push eax
call fcn.10031980
add esp, 0xc
mov dword [ebp - 4], 0
xor eax, eax
mov dword [ebp - 0x130], 0
mov dword [ebp - 0x130], 0
mov dword [ebp - 0x12c], 0
mov dword [ebp - 0x12c], 7
mov word [ebp - 0x140], ax
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x158]
cmp dword [ebp - 0x144], 8
lea esi, [ebp - 0x158]
mov eax, dword [ebp - 0x148]
cmovae ecx, dword [ebp - 0x158]
cmovae esi, dword [ebp - 0x158]
xor edi, edi
xor edx, edx
lea eax, [ecx + eax*2]
mov ecx, eax
sub ecx, esi
inc ecx
shr ecx, 1
cmp esi, eax
cmova ecx, edx
test ecx, ecx
je 0x10031b69
mov ebx, ecx
nop dword [eax]
movzx eax, word [esi]
push eax
call fcn.10091ccd
add esp, 4
movzx eax, ax
lea ecx, [ebp - 0x140]
push eax
call fcn.10037570
inc edi
lea esi, [esi + 2]
cmp edi, ebx
jne 0x10031b40
mov ebx, dword [ebp - 0x164]
xor ecx, ecx
mov dword [ebp - 0x118], 0
mov dword [ebp - 0x118], ecx
mov edx, 7
mov dword [ebp - 0x114], 0
xor eax, eax
mov dword [ebp - 0x114], edx
mov word [ebp - 0x128], ax
mov byte [ebp - 4], 2
mov esi, ebx
cmp dword [ebx + 0x14], 8
jb 0x10031ba9
mov esi, dword [ebx]
mov ebx, esi
mov eax, dword [ebp - 0x15c]
xor edi, edi
mov eax, dword [eax]
lea eax, [ebx + eax*2]
mov ebx, eax
sub ebx, esi
inc ebx
shr ebx, 1
cmp esi, eax
cmova ebx, edi
test ebx, ebx
je 0x10031bf5
movzx eax, word [esi]
push eax
call fcn.10091ccd
add esp, 4
movzx eax, ax
lea ecx, [ebp - 0x128]
push eax
call fcn.10037570
inc edi
lea esi, [esi + 2]
cmp edi, ebx
jne 0x10031bc6
mov edx, dword [ebp - 0x114]
mov ecx, dword [ebp - 0x118]
cmp dword [ebp - 0x12c], 8
lea eax, [ebp - 0x140]
mov edi, dword [ebp - 0x130]
lea esi, [ebp - 0x128]
cmovae eax, dword [ebp - 0x140]
cmp edx, 8
cmovae esi, dword [ebp - 0x128]
cmp ecx, edi
jne 0x10031c3a
push ecx
push eax
push esi
call fcn.1000e840
add esp, 0xc
test eax, eax
jne 0x10031c3a
test edi, edi
je 0x10031c3a
mov bl, 1
jmp 0x10031c3c
xor bl, bl
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x128]
call fcn.10005430
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x140]
call fcn.10005430
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x158]
call fcn.10005430
mov al, bl
jmp 0x10031c72
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.1004f51c
mov esp, ebp
pop ebp
ret