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

Disassembly:
sub esp, 0x824
push ebp
push esi
push edi
call fcn.10007bda
mov esi, eax
mov dword [esp + 0x10], esi
test esi, esi
jne 0x10007362
push 0x65b
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x10007800
push ebx
mov ebx, dword [esp + 0x840]
test ebx, ebx
je 0x100077ee
call fcn.10007b32
test eax, eax
jne 0x100077ee
mov eax, ebx
mov ebp, eax
push 0
pop ebx
and ebp, 0xffffff00
je 0x100077e2
test eax, 0xffffe00c
jne 0x100077d8
mov edi, dword [esp + 0x838]
test edi, edi
je 0x100077d8
cmp dword [esp + 0x83c], ebx
jne 0x100077d8
movzx eax, al
mov dword [esp + 0x840], eax
mov eax, 0xe00
test ebp, 0x1000
je 0x100073d8
and ebp, 0xffffefff
or ebp, eax
cmp ebp, eax
je 0x1000750f
call fcn.10007c22
test eax, eax
je 0x100073ee
push edi
call eax
jmp 0x100073f0
mov eax, ebx
mov ecx, ebp
and ecx, 0x100
mov dword [esp + 0x10], ecx
je 0x1000742d
test eax, eax
je 0x100077d8
cmp eax, 3
je 0x100077d8
cmp eax, 5
je 0x100077d8
cmp ebp, 0xf00
jne 0x1000742d
or dword [esp + 0x840], 8
jmp 0x1000750f
mov esi, 0x400
test esi, ebp
jne 0x100077d8
test byte [esp + 0x840], 0x62
je 0x100075db
test eax, eax
je 0x1000745a
cmp eax, 3
je 0x1000745a
cmp eax, 5
jne 0x1000750b
test ebp, 0x200
je 0x10007568
push esi
lea eax, [esp + 0x38]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov edx, eax
test edx, edx
je 0x100077d1
cmp edx, esi
jae 0x100077d1
movzx ecx, word [esp + edx*2 + 0x34]
mov eax, ecx
push 0x5c
mov dword [esp + 0x1c], eax
pop eax
cmp cx, ax
je 0x100074cf
mov eax, ecx
mov dword [esp + 0x18], 0x2f
push 0x5c
movzx eax, ax
pop ecx
cmp ax, word [esp + 0x18]
je 0x100074cf
test edx, edx
je 0x100077d1
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 0x100074a8
inc edx
mov ecx, edi
cmp word [edi], bx
je 0x100074f0
cmp edx, esi
jae 0x100077d1
mov ax, word [ecx]
add ecx, 2
mov word [esp + edx*2 + 0x34], ax
inc edx
cmp word [ecx], bx
jne 0x100074d7
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 0x10007568
lea edi, [esp + 0x34]
mov esi, dword [esp + 0x14]
call fcn.10007c52
mov ebp, eax
test ebp, ebp
je 0x10007524
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 0x10007559
test ebp, ebp
je 0x10007559
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 0x100077cd
mov eax, edi
jmp 0x100077ff
test ebp, 0x800
je 0x100075d4
push esi
lea eax, [esp + 0x38]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
mov ecx, eax
test ecx, ecx
je 0x100077d1
cmp ecx, esi
jae 0x100077d1
push 0x5c
pop eax
cmp word [esp + ecx*2 + 0x34], ax
je 0x100075b4
inc ecx
mov word [esp + ecx*2 + 0x34], ax
jmp 0x100075b4
cmp ecx, esi
jae 0x100077d1
mov ax, word [edi]
add edi, 2
mov word [esp + ecx*2 + 0x34], ax
inc ecx
cmp word [edi], bx
jne 0x100075a0
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 0x10007507
push 0x7e
jmp 0x100077da
call fcn.10007b92
mov dword [esp + 0x14], eax
test eax, eax
je 0x100077d1
cmp dword [esp + 0x10], 0
mov esi, ebx
push 0x5c
pop ecx
je 0x1000766d
mov edx, edi
cmp word [edi], bx
je 0x100077d1
mov dword [esp + 0x10], esi
cmp esi, 0x400
jae 0x100077d1
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 0x10007603
test esi, esi
je 0x100077d1
mov esi, dword [esp + 0x10]
cmp ax, cx
je 0x10007662
movzx edx, ax
push 0x2f
pop eax
cmp dx, ax
je 0x10007662
test esi, esi
je 0x100077d1
movzx eax, word [esp + esi*2 + 0x32]
dec esi
mov edx, eax
cmp ax, cx
jne 0x10007645
push 0x3b
pop eax
mov word [esp + esi*2 + 0x36], ax
add esi, 2
test ebp, 0x200
je 0x100076d2
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 0x100077d1
cmp eax, dword [esp + 0x10]
jae 0x100077d1
dec eax
push 0x5c
add esi, eax
pop ecx
jmp 0x100076bb
push 0x2f
pop eax
cmp dx, ax
je 0x100076c7
test esi, esi
je 0x100077d1
dec esi
movzx eax, word [esp + esi*2 + 0x34]
mov edx, eax
cmp ax, cx
jne 0x100076aa
push 0x3b
pop eax
mov word [esp + esi*2 + 0x36], ax
add esi, 2
test ebp, 0x800
je 0x10007702
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 0x100077d1
cmp eax, ebp
jae 0x100077d1
add esi, eax
xor eax, eax
mov word [esp + esi*2 + 0x34], ax
mov eax, edi
mov dword [esp + 0x30], eax
jmp 0x10007714
add edi, 2
cmp word [edi], bx
jne 0x10007711
sub edi, eax
and edi, 0xfffffffe
lea eax, [edi + 2]
cmp eax, 0xffff
ja 0x100077d8
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 0x1000775d
push 2
mov dword [esp + 0x20], 2
pop eax
test cl, 0x10
je 0x1000776b
or eax, 0x1000
mov dword [esp + 0x1c], eax
test cl, cl
jns 0x10007778
or eax, 0x800000
mov dword [esp + 0x1c], eax
call fcn.10007c52
mov esi, eax
test esi, esi
je 0x1000778d
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 0x100077ba
test esi, esi
je 0x100077ba
lea eax, [esp + 0x20]
push eax
push dword [esp + 0x24]
call esi
test edi, edi
jns 0x100077c5
mov ecx, edi
call fcn.10007977
mov eax, dword [esp + 0x24]
test eax, eax
jne 0x100077ff
xor eax, eax
jmp 0x100077ff
push 0x65b
jmp 0x100077da
push 0x57
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x100077cd
mov edi, dword [esp + 0x838]
jmp 0x1000750f
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