Function at 0x10031b70
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x100bd17d
mov eax, dword fs:[0]
push eax
sub esp, 0xd4
mov eax, dword [0x100f6458]
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 dword [ebp - 0xc8], esi
mov byte [ebp - 0xc1], 0
cmp dword [esi + 0x14], 8
jb 0x10031bb8
mov eax, dword [esi]
push eax
call dword [sym.imp.SHLWAPI.dll_PathIsDirectoryW]
test eax, eax
jne 0x10031ea5
cmp dword [esi + 0x14], 8
mov eax, esi
jb 0x10031bd1
mov eax, dword [esi]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x10031be3
mov al, 1
jmp 0x10031eab
mov eax, dword [esi + 0x10]
test eax, eax
je 0x10031ea5
lea edi, [eax*2 + 2]
xor ecx, ecx
inc eax
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.100662f7
push edi
mov ebx, eax
push 0
push ebx
call fcn.10089510
add esp, 0x10
mov edx, esi
cmp dword [esi + 0x14], 8
jb 0x10031c24
mov edx, dword [esi]
shr edi, 1
je 0x10031c61
mov esi, 0x7ffffffe
mov ecx, ebx
sub esi, edi
sub edx, ebx
lea eax, [esi + edi]
test eax, eax
je 0x10031c4e
movzx eax, word [edx + ecx]
test ax, ax
je 0x10031c4e
mov word [ecx], ax
add ecx, 2
sub edi, 1
jne 0x10031c33
mov esi, dword [ebp - 0xc8]
lea eax, [ecx - 2]
test edi, edi
cmovne eax, ecx
xor ecx, ecx
mov word [eax], cx
test ebx, ebx
je 0x10031ea5
push ebx
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
mov ecx, ebx
mov dword [ebp - 0xd0], 0
xor eax, eax
mov dword [ebp - 0xcc], 0
mov dword [ebp - 0xd0], 0
mov dword [ebp - 0xcc], 7
mov word [ebp - 0xe0], ax
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10031ca6
sub ecx, edx
sar ecx, 1
push ecx
push ebx
lea ecx, [ebp - 0xe0]
call fcn.1000c5b0
mov dword [ebp - 4], 0
lea eax, [ebp - 0xe0]
push eax
call fcn.100319f0
add esp, 4
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0xcc]
cmp edx, 8
jb 0x10031d1f
mov ecx, dword [ebp - 0xe0]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x10031d15
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10031ec7
push edx
push ecx
call fcn.10065f62
add esp, 8
xor eax, eax
mov dword [ebp - 0xd0], 0
push 0xb0
push eax
mov word [ebp - 0xe0], ax
lea eax, [ebp - 0xc0]
push eax
mov dword [ebp - 0xcc], 7
call fcn.10089510
add esp, 0xc
mov eax, esi
cmp dword [esi + 0x14], 8
jb 0x10031d5b
mov eax, dword [esi]
push 1
push 0x40
push 8
push eax
lea ecx, [ebp - 0xc0]
call fcn.1002e320
mov dword [ebp - 4], 1
lea edi, [ebp - 0xbc]
cmp dword [ebp - 0x70], 0
jne 0x10031d84
xor edi, edi
jmp 0x10031da8
lea ecx, [ebp - 0xbc]
call fcn.10032a80
push dword [ebp - 0x70]
xor ecx, ecx
test al, al
cmove edi, ecx
call fcn.10094d25
xor ecx, ecx
add esp, 4
test eax, eax
cmovne edi, ecx
push 2
push 0
lea ecx, [ebp - 0xbc]
call fcn.100352f0
test edi, edi
jne 0x10031de5
mov eax, dword [ebp - 0xc0]
lea ecx, [ebp - 0xc0]
push edi
mov eax, dword [eax + 4]
add ecx, eax
xor eax, eax
cmp dword [ecx + 0x38], eax
sete al
lea eax, [eax*4 + 2]
or eax, dword [ecx + 0xc]
push eax
call fcn.1000c6d0
push ebx
call fcn.10066300
add esp, 4
cmp dword [esi + 0x14], 8
jb 0x10031df6
mov esi, dword [esi]
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
cmp eax, 1
sete byte [ebp - 0xc1]
mov dword [ebp - 4], 0xffffffff
lea eax, [ebp - 0x58]
mov dword [ebp - 0xc8], eax
mov eax, dword [ebp - 0xc0]
mov eax, dword [eax + 4]
mov dword [ebp + eax - 0xc0], vtable.std::basic_ofstream_char__struct_std::char_traits_char__.0
mov eax, dword [ebp - 0xc0]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x68]
mov dword [ebp + ecx - 0xc4], eax
mov dword [ebp - 4], 2
lea ecx, [ebp - 0xbc]
call fcn.1002e980
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0xc0]
mov eax, dword [eax + 4]
mov dword [ebp + eax - 0xc0], vtable.std::basic_ostream_char__struct_std::char_traits_char__.0
mov eax, dword [ebp - 0xc0]
mov ecx, dword [eax + 4]
lea eax, [ecx - 8]
mov dword [ebp + ecx - 0xc4], eax
lea eax, [ebp - 0x58]
mov dword [ebp - 0xc8], eax
mov dword [ebp - 0x58], vtable.std::basic_ios_char__struct_std::char_traits_char__.0
mov dword [ebp - 4], 0xffffffff
push eax
mov dword [ebp - 0x58], vtable.std::ios_base.0
call fcn.1003905c
add esp, 4
mov al, byte [ebp - 0xc1]
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.100662e1
mov esp, ebp
pop ebp
ret
call fcn.1008c70a
int3