Function at 0x10005570
Capabilities:
Check if file exists
Get common file path

Disassembly:
push 0xffffffffffffffff
push 0x100516f6
mov eax, dword fs:[0]
push eax
sub esp, 0x234
mov eax, dword [0x10067060]
xor eax, esp
mov dword [esp + 0x230], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x10067060]
xor eax, esp
push eax
lea eax, [esp + 0x248]
mov dword fs:[0], eax
mov edi, dword [esp + 0x25c]
mov esi, dword [esp + 0x258]
xor ebx, ebx
mov dword [esp + 0x1c], ebx
push 0x1006b028
mov dword [esp + 0x1c], edi
mov dword [esp + 0x20], 0x1006b028
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push edi
push str._FindFileByDocName:_s
mov dword [esp + 0x258], ebx
call fcn.100210fd
mov eax, dword [0x1006ba70]
mov edi, dword [eax]
mov ebp, dword [0x1006ba5c]
add esp, 8
jmp 0x10005600
mov ebx, dword [0x1006ba70]
test ebp, ebp
je 0x10005612
cmp ebp, dword [0x1006ba5c]
je 0x10005617
call fcn.10038059
cmp edi, ebx
je 0x100056f5
test ebp, ebp
jne 0x1000563f
call fcn.10038059
xor eax, eax
cmp edi, dword [eax + 0x14]
jne 0x10005634
call fcn.10038059
cmp dword [edi + 0x20], 8
jb 0x10005644
mov eax, dword [edi + 0xc]
jmp 0x10005647
mov eax, dword [ebp]
jmp 0x1000562a
lea eax, [edi + 0xc]
mov ebx, dword [sym.imp.SHLWAPI.dll_PathFindFileNameW]
push eax
call ebx
test eax, eax
je 0x10005696
cmp dword [esp + 0x18], 0
je 0x10005696
test ebp, ebp
jne 0x1000567b
call fcn.10038059
xor eax, eax
cmp edi, dword [eax + 0x14]
jne 0x10005670
call fcn.10038059
cmp dword [edi + 0x20], 8
jb 0x10005680
mov eax, dword [edi + 0xc]
jmp 0x10005683
mov eax, dword [ebp]
jmp 0x10005666
lea eax, [edi + 0xc]
mov ecx, dword [esp + 0x18]
push ecx
push eax
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
je 0x100056b7
test ebp, ebp
jne 0x100056b2
call fcn.10038059
xor eax, eax
cmp edi, dword [eax + 0x14]
jne 0x100056ab
call fcn.10038059
mov edi, dword [edi]
jmp 0x10005600
mov eax, dword [ebp]
jmp 0x100056a1
test ebp, ebp
jne 0x100056f0
call fcn.10038059
cmp edi, dword [ebp + 0x14]
jne 0x100056ca
call fcn.10038059
xor edx, edx
push 0xffffffffffffffff
mov dword [esi + 0x18], 7
mov dword [esi + 0x14], 0
lea eax, [edi + 8]
push edx
mov ecx, esi
mov word [esi + 4], dx
call fcn.100091f0
jmp 0x10005968
mov ebp, dword [ebp]
jmp 0x100056c0
mov edi, dword [esp + 0x18]
push edi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x100057b7
push 0x10059030
push edi
call dword [sym.imp.SHLWAPI.dll_StrStrIW]
test eax, eax
jne 0x10005780
push 0x206
push eax
lea ecx, [esp + 0x46]
push ecx
mov word [esp + 0x48], ax
call fcn.1003b960
add esp, 0xc
lea edx, [esp + 0x3c]
push edx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
push edi
lea eax, [esp + 0x40]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
xor ecx, ecx
lea eax, [esp + 0x3c]
mov dword [esi + 0x18], 7
mov dword [esi + 0x14], 0
mov word [esi + 4], cx
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x10005767
sub eax, edx
sar eax, 1
push eax
lea eax, [esp + 0x40]
jmp 0x10005963
xor edx, edx
mov dword [esi + 0x18], 7
mov dword [esi + 0x14], 0
mov eax, edi
mov word [esi + 4], dx
lea edx, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x100057a0
sub eax, edx
sar eax, 1
push eax
mov eax, edi
jmp 0x10005963
mov eax, dword [0x1006ba70]
mov edi, dword [eax]
mov ebx, dword [0x1006ba5c]
mov ebp, dword [0x1006ba70]
test ebx, ebx
je 0x100057d6
cmp ebx, dword [0x1006ba5c]
je 0x100057db
call fcn.10038059
cmp edi, ebp
je 0x10005855
test ebx, ebx
jne 0x100057ff
call fcn.10038059
xor eax, eax
cmp edi, dword [eax + 0x14]
jne 0x100057f4
call fcn.10038059
cmp dword [edi + 0x20], 8
jb 0x10005803
mov eax, dword [edi + 0xc]
jmp 0x10005806
mov eax, dword [ebx]
jmp 0x100057ea
lea eax, [edi + 0xc]
mov ecx, dword [esp + 0x18]
push ecx
push eax
call dword [sym.imp.SHLWAPI.dll_PathFindFileNameW]
push eax
call dword [sym.imp.SHLWAPI.dll_StrStrIW]
test eax, eax
jne 0x1000583a
test ebx, ebx
jne 0x10005836
call fcn.10038059
xor eax, eax
cmp edi, dword [eax + 0x14]
jne 0x10005832
call fcn.10038059
mov edi, dword [edi]
jmp 0x100057c4
mov eax, dword [ebx]
jmp 0x10005828
test ebx, ebx
jne 0x1000584b
call fcn.10038059
cmp edi, dword [ebx + 0x14]
jmp 0x100056c3
mov ebx, dword [ebx]
cmp edi, dword [ebx + 0x14]
jmp 0x100056c3
mov ebx, dword [esp + 0x18]
mov edi, dword [sym.imp.SHLWAPI.dll_StrStrIW]
push 0x10059034
push ebx
call edi
test eax, eax
je 0x10005949
push 0x206
xor ebp, ebp
lea ecx, [esp + 0x42]
xor eax, eax
push ebp
push ecx
mov word [esp + 0x48], ax
call fcn.1003b960
add esp, 0xc
push 0x104
push ebx
lea edx, [esp + 0x44]
push edx
call dword [sym.imp.KERNEL32.dll_lstrcpynW]
push 0x10059034
lea eax, [esp + 0x40]
push eax
call edi
mov edi, eax
lea edx, [esp + 0x3c]
push edx
lea eax, [esp + 0x24]
xor ecx, ecx
push eax
mov word [edi], cx
call fcn.10005570
add esp, 8
mov byte [esp + 0x250], 1
cmp dword [esp + 0x34], ebp
je 0x10005913
xor ecx, ecx
mov edi, 7
mov dword [esi + 0x18], edi
mov dword [esi + 0x14], ebp
push 0xffffffffffffffff
mov word [esi + 4], cx
push ebp
lea eax, [esp + 0x28]
mov ecx, esi
call fcn.100091f0
cmp dword [esp + 0x38], 8
jb 0x10005902
mov edx, dword [esp + 0x24]
push edx
call fcn.10038093
add esp, 4
xor eax, eax
mov dword [esp + 0x38], edi
mov dword [esp + 0x34], ebp
mov word [esp + 0x24], ax
jmp 0x10005968
add edi, 6
push edi
push esi
call fcn.10005570
add esp, 8
cmp dword [esp + 0x38], 8
jb 0x10005934
mov ecx, dword [esp + 0x24]
push ecx
call fcn.10038093
add esp, 4
xor edx, edx
mov dword [esp + 0x38], 7
mov dword [esp + 0x34], ebp
mov word [esp + 0x24], dx
jmp 0x10005968
xor eax, eax
mov dword [esi + 0x18], 7
mov dword [esi + 0x14], 0
mov word [esi + 4], ax
push eax
mov eax, 0x10058af0
call fcn.1000a400
push 0x1006b028
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, esi
mov ecx, dword [esp + 0x248]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x230]
xor ecx, esp
call fcn.10037693
add esp, 0x240
ret