Function at 0x100312f0
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1010beb0
mov eax, dword fs:[0]
push eax
sub esp, 0x10
push ebx
push esi
push edi
mov eax, dword [0x101555ac]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, dword [ebp + 8]
test ebx, ebx
jne 0x10031334
lea eax, [ebx + 6]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push ebx
lea ecx, [ebp + 8]
call fcn.10003fd0
mov edi, dword [ebp + 8]
xor esi, esi
mov dword [ebp - 4], 0
movzx eax, word [edi]
test ax, ax
je 0x100313c1
mov ecx, eax
push ecx
call fcn.100bd8e1
add esp, 4
test eax, eax
je 0x1003136b
test esi, esi
mov eax, edi
cmovne eax, esi
mov esi, eax
jmp 0x1003136d
xor esi, esi
movzx eax, word [edi + 2]
add edi, 2
mov ecx, eax
test ax, ax
jne 0x10031353
test esi, esi
je 0x100313be
mov eax, dword [ebp + 8]
sub esi, eax
sar esi, 1
js 0x100315e0
mov ecx, dword [eax - 8]
mov edx, 1
sub edx, dword [eax - 4]
sub ecx, esi
or ecx, edx
jge 0x100313a9
push esi
lea ecx, [ebp + 8]
call fcn.100052c0
mov eax, dword [ebp + 8]
cmp esi, dword [eax - 8]
jg 0x100315e0
mov dword [eax - 0xc], esi
xor ecx, ecx
mov eax, dword [ebp + 8]
mov word [eax + esi*2], cx
mov edi, dword [ebp + 8]
movzx eax, word [edi]
push eax
call fcn.100bd8e1
add esp, 4
test eax, eax
je 0x100313e5
movzx eax, word [edi + 2]
add edi, 2
push eax
call fcn.100bd8e1
add esp, 4
test eax, eax
jne 0x100313d1
mov eax, dword [ebp + 8]
cmp edi, eax
je 0x10031465
mov edx, dword [eax - 0xc]
sub edi, eax
sar edi, 1
test edx, edx
js 0x100315ea
mov ecx, dword [eax - 8]
mov esi, 1
sub esi, dword [eax - 4]
sub ecx, edx
or ecx, esi
jge 0x10031418
push edx
lea ecx, [ebp + 8]
call fcn.100052c0
mov eax, dword [ebp + 8]
mov edx, dword [eax - 0xc]
lea esi, [eax + edi*2]
mov ecx, edx
sub ecx, edi
mov dword [ebp - 0x10], ecx
lea ecx, [ecx*2 + 2]
push ecx
push esi
lea ecx, [edx*2 + 2]
push ecx
push eax
call fcn.1001a490
mov ecx, dword [ebp - 0x10]
add esp, 0x10
test ecx, ecx
js 0x100315e0
mov eax, dword [ebp + 8]
cmp ecx, dword [eax - 8]
jg 0x100315e0
mov dword [eax - 0xc], ecx
xor edx, edx
mov eax, dword [ebp + 8]
mov word [eax + ecx*2], dx
mov eax, dword [ebp + 8]
cmp dword [eax - 0xc], 0
jne 0x10031475
mov esi, 3
jmp 0x100315ad
lea edx, [ebx + 2]
nop dword [eax + eax]
mov cx, word [ebx]
add ebx, 2
test cx, cx
jne 0x10031480
sub ebx, edx
sar ebx, 1
cmp ebx, 0x102
jbe 0x100314a1
mov esi, 8
jmp 0x100315ad
push eax
call dword [sym.imp.SHLWAPI.dll_PathIsRelativeW]
test eax, eax
je 0x100314b6
mov esi, 5
jmp 0x100315aa
push dword [ebp + 8]
mov esi, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
call esi
test eax, eax
je 0x100314da
push dword [ebp + 8]
call dword [sym.imp.SHLWAPI.dll_PathIsDirectoryW]
test eax, eax
jne 0x100314da
lea esi, [eax + 4]
jmp 0x100315aa
lea eax, [ebp + 8]
push eax
call fcn.10031b20
add esp, 4
test eax, eax
mov eax, dword [ebp + 8]
je 0x100314f7
mov esi, 6
jmp 0x100315ad
cmp dword [eax - 0xc], 0
jl 0x100315f4
movzx eax, word [eax]
push eax
call fcn.10042600
mov ecx, eax
add esp, 4
or ecx, edx
jne 0x1003151b
lea esi, [ecx + 0xa]
jmp 0x100315aa
shrd eax, edx, 0x14
shr edx, 0x14
test edx, edx
ja 0x10031534
jb 0x1003152d
cmp eax, 0x32
jae 0x10031534
mov esi, 1
jmp 0x100315aa
push dword [ebp + 8]
call esi
test eax, eax
jne 0x1003158b
push eax
push eax
lea ecx, [ebp - 0x1c]
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], eax
call fcn.10032e70
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x10]
mov byte [ebp - 4], 1
push eax
push ecx
lea eax, [ebp + 8]
mov ecx, esp
push eax
call fcn.10024b70
lea ecx, [ebp - 0x1c]
call fcn.10042c60
lea ecx, [ebp - 0x1c]
test eax, eax
jne 0x10031582
call fcn.100423d0
mov esi, 9
jmp 0x100315aa
mov byte [ebp - 4], 0
call fcn.100423d0
push ecx
lea eax, [ebp + 8]
mov ecx, esp
push eax
call fcn.10024b70
call fcn.100433a0
add esp, 4
test eax, eax
jne 0x100315a8
lea esi, [eax + 2]
jmp 0x100315aa
xor esi, esi
mov eax, dword [ebp + 8]
lea edi, [eax - 0x10]
mov dword [ebp - 4], 0xffffffff
or eax, 0xffffffff
lock xadd dword [edi + 0xc], eax
dec eax
test eax, eax
jg 0x100315cc
mov ecx, dword [edi]
push edi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0x80070057
call fcn.100042e0
push 0x80070057
call fcn.100042e0
push 0x80070057
call fcn.100042e0
int3