Function at 0x10031d40
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x100c5d01
mov eax, dword fs:[0]
push eax
sub esp, 0x15c
mov eax, dword [0x1010739c]
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 0x10031d84
mov eax, dword [esi]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x10031fb0
cmp dword [ebx + 0x10], 0
lea eax, [ebx + 0x10]
mov dword [ebp - 0x15c], eax
je 0x10031fb0
push 0xff
lea eax, [ebp - 0x110]
push 0
push eax
call fcn.1008f970
add esp, 0xc
cmp dword [esi + 0x14], 8
jb 0x10031dc4
mov esi, dword [esi]
push 0xff
lea eax, [ebp - 0x110]
push eax
push esi
call fcn.1006e850
add esp, 0xc
cmp eax, 1
jne 0x10031fb0
push 0xfde9
lea eax, [ebp - 0x110]
push eax
lea eax, [ebp - 0x158]
push eax
call fcn.10031cc0
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 0x10031ea9
mov ebx, ecx
nop dword [eax]
movzx eax, word [esi]
push eax
call fcn.100996e6
add esp, 4
movzx eax, ax
lea ecx, [ebp - 0x140]
push eax
call fcn.10037880
inc edi
lea esi, [esi + 2]
cmp edi, ebx
jne 0x10031e80
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 0x10031ee9
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 0x10031f35
movzx eax, word [esi]
push eax
call fcn.100996e6
add esp, 4
movzx eax, ax
lea ecx, [ebp - 0x128]
push eax
call fcn.10037880
inc edi
lea esi, [esi + 2]
cmp edi, ebx
jne 0x10031f06
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 0x10031f7a
push ecx
push eax
push esi
call fcn.1000ea00
add esp, 0xc
test eax, eax
jne 0x10031f7a
test edi, edi
je 0x10031f7a
mov bl, 1
jmp 0x10031f7c
xor bl, bl
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x128]
call fcn.100055d0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x140]
call fcn.100055d0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x158]
call fcn.100055d0
mov al, bl
jmp 0x10031fb2
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.100512b9
mov esp, ebp
pop ebp
ret