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

Disassembly:
sub esp, 0x824
push ebp
push esi
push edi
call fcn.100082fa
mov esi, eax
mov dword [esp + 0x10], esi
test esi, esi
jne 0x10007a82
push 0x65b
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x10007f20
push ebx
mov ebx, dword [esp + 0x840]
test ebx, ebx
je 0x10007f0e
call fcn.10008252
test eax, eax
jne 0x10007f0e
mov eax, ebx
mov ebp, eax
push 0
pop ebx
and ebp, 0xffffff00
je 0x10007f02
test eax, 0xffffe00c
jne 0x10007ef8
mov edi, dword [esp + 0x838]
test edi, edi
je 0x10007ef8
cmp dword [esp + 0x83c], ebx
jne 0x10007ef8
movzx eax, al
mov dword [esp + 0x840], eax
mov eax, 0xe00
test ebp, 0x1000
je 0x10007af8
and ebp, 0xffffefff
or ebp, eax
cmp ebp, eax
je 0x10007c2f
call fcn.10008342
test eax, eax
je 0x10007b0e
push edi
call eax
jmp 0x10007b10
mov eax, ebx
mov ecx, ebp
and ecx, 0x100
mov dword [esp + 0x10], ecx
je 0x10007b4d
test eax, eax
je 0x10007ef8
cmp eax, 3
je 0x10007ef8
cmp eax, 5
je 0x10007ef8
cmp ebp, 0xf00
jne 0x10007b4d
or dword [esp + 0x840], 8
jmp 0x10007c2f
mov esi, 0x400
test esi, ebp
jne 0x10007ef8
test byte [esp + 0x840], 0x62
je 0x10007cfb
test eax, eax
je 0x10007b7a
cmp eax, 3
je 0x10007b7a
cmp eax, 5
jne 0x10007c2b
test ebp, 0x200
je 0x10007c88
push esi
lea eax, [esp + 0x38]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov edx, eax
test edx, edx
je 0x10007ef1
cmp edx, esi
jae 0x10007ef1
movzx ecx, word [esp + edx*2 + 0x34]
mov eax, ecx
push 0x5c
mov dword [esp + 0x1c], eax
pop eax
cmp cx, ax
je 0x10007bef
mov eax, ecx
mov dword [esp + 0x18], 0x2f
push 0x5c
movzx eax, ax
pop ecx
cmp ax, word [esp + 0x18]
je 0x10007bef
test edx, edx
je 0x10007ef1
movzx eax, word [esp + edx*2 + 0x32]
dec edx
mov edi, eax
mov dword [esp + 0x10], edi
mov edi, dword [esp + 0x838]
cmp ax, cx
jne 0x10007bc8
inc edx
mov ecx, edi
cmp word [edi], bx
je 0x10007c10
cmp edx, esi
jae 0x10007ef1
mov ax, word [ecx]
add ecx, 2
mov word [esp + edx*2 + 0x34], ax
inc edx
cmp word [ecx], bx
jne 0x10007bf7
xor eax, eax
mov word [esp + edx*2 + 0x34], ax
lea eax, [esp + 0x34]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x10007c88
lea edi, [esp + 0x34]
mov esi, dword [esp + 0x14]
call fcn.10008372
mov ebp, eax
test ebp, ebp
je 0x10007c44
lea eax, [esp + 0x28]
push eax
push ebx
call ebp
mov ebx, eax
push dword [esp + 0x840]
push dword [esp + 0x840]
push edi
call esi
mov edi, eax
test ebx, ebx
js 0x10007c79
test ebp, ebp
je 0x10007c79
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
lea eax, [esp + 0x28]
push eax
push dword [esp + 0x2c]
call ebp
push esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
test edi, edi
je 0x10007eed
mov eax, edi
jmp 0x10007f1f
test ebp, 0x800
je 0x10007cf4
push esi
lea eax, [esp + 0x38]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
mov ecx, eax
test ecx, ecx
je 0x10007ef1
cmp ecx, esi
jae 0x10007ef1
push 0x5c
pop eax
cmp word [esp + ecx*2 + 0x34], ax
je 0x10007cd4
inc ecx
mov word [esp + ecx*2 + 0x34], ax
jmp 0x10007cd4
cmp ecx, esi
jae 0x10007ef1
mov ax, word [edi]
add edi, 2
mov word [esp + ecx*2 + 0x34], ax
inc ecx
cmp word [edi], bx
jne 0x10007cc0
xor eax, eax
mov word [esp + ecx*2 + 0x34], ax
lea eax, [esp + 0x34]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x10007c27
push 0x7e
jmp 0x10007efa
call fcn.100082b2
mov dword [esp + 0x14], eax
test eax, eax
je 0x10007ef1
cmp dword [esp + 0x10], 0
mov esi, ebx
push 0x5c
pop ecx
je 0x10007d8d
mov edx, edi
cmp word [edi], bx
je 0x10007ef1
mov dword [esp + 0x10], esi
cmp esi, 0x400
jae 0x10007ef1
movzx eax, word [edx]
add edx, 2
mov edi, eax
mov word [esp + esi*2 + 0x34], ax
inc esi
mov dword [esp + 0x18], edi
mov edi, dword [esp + 0x838]
cmp word [edx], bx
jne 0x10007d23
test esi, esi
je 0x10007ef1
mov esi, dword [esp + 0x10]
cmp ax, cx
je 0x10007d82
movzx edx, ax
push 0x2f
pop eax
cmp dx, ax
je 0x10007d82
test esi, esi
je 0x10007ef1
movzx eax, word [esp + esi*2 + 0x32]
dec esi
mov edx, eax
cmp ax, cx
jne 0x10007d65
push 0x3b
pop eax
mov word [esp + esi*2 + 0x36], ax
add esi, 2
test ebp, 0x200
je 0x10007df2
mov eax, 0x400
sub eax, esi
push eax
mov dword [esp + 0x14], eax
lea eax, [esp + 0x38]
lea eax, [eax + esi*2]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x10007ef1
cmp eax, dword [esp + 0x10]
jae 0x10007ef1
dec eax
push 0x5c
add esi, eax
pop ecx
jmp 0x10007ddb
push 0x2f
pop eax
cmp dx, ax
je 0x10007de7
test esi, esi
je 0x10007ef1
dec esi
movzx eax, word [esp + esi*2 + 0x34]
mov edx, eax
cmp ax, cx
jne 0x10007dca
push 0x3b
pop eax
mov word [esp + esi*2 + 0x36], ax
add esi, 2
test ebp, 0x800
je 0x10007e22
mov ebp, 0x400
lea eax, [esp + 0x34]
sub ebp, esi
lea eax, [eax + esi*2]
push ebp
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
je 0x10007ef1
cmp eax, ebp
jae 0x10007ef1
add esi, eax
xor eax, eax
mov word [esp + esi*2 + 0x34], ax
mov eax, edi
mov dword [esp + 0x30], eax
jmp 0x10007e34
add edi, 2
cmp word [edi], bx
jne 0x10007e31
sub edi, eax
and edi, 0xfffffffe
lea eax, [edi + 2]
cmp eax, 0xffff
ja 0x10007ef8
mov ecx, dword [esp + 0x840]
movzx eax, di
mov word [esp + 0x2c], ax
add eax, 2
mov word [esp + 0x2e], ax
mov eax, ebx
mov dword [esp + 0x24], ebx
mov dword [esp + 0x1c], ebx
test cl, 1
je 0x10007e7d
push 2
mov dword [esp + 0x20], 2
pop eax
test cl, 0x10
je 0x10007e8b
or eax, 0x1000
mov dword [esp + 0x1c], eax
test cl, cl
jns 0x10007e98
or eax, 0x800000
mov dword [esp + 0x1c], eax
call fcn.10008372
mov esi, eax
test esi, esi
je 0x10007ead
lea eax, [esp + 0x20]
push eax
push ebx
call esi
mov ebx, eax
lea eax, [esp + 0x24]
push eax
lea eax, [esp + 0x30]
push eax
lea eax, [esp + 0x24]
push eax
lea eax, [esp + 0x40]
push eax
call dword [esp + 0x24]
mov edi, eax
test ebx, ebx
js 0x10007eda
test esi, esi
je 0x10007eda
lea eax, [esp + 0x20]
push eax
push dword [esp + 0x24]
call esi
test edi, edi
jns 0x10007ee5
mov ecx, edi
call fcn.10008097
mov eax, dword [esp + 0x24]
test eax, eax
jne 0x10007f1f
xor eax, eax
jmp 0x10007f1f
push 0x65b
jmp 0x10007efa
push 0x57
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x10007eed
mov edi, dword [esp + 0x838]
jmp 0x10007c2f
push ebx
push dword [esp + 0x840]
push dword [esp + 0x840]
call esi
pop ebx
pop edi
pop esi
pop ebp
add esp, 0x824
ret 0xc