Function at 0x40fce0
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x45fb08
mov eax, dword fs:[0]
push eax
sub esp, 0x2c0
mov eax, dword [0x47c078]
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 edi, dword [ebp + 8]
push 0
push 0
mov dword [ebp - 0x2bc], edi
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
jne 0x40fdbb
mov eax, dword [0x483994]
test eax, eax
je 0x40fda3
cmp byte [eax + 4], 3
ja 0x40fda3
push 0x463cf4
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea ecx, [ebp - 0x98]
call fcn.00409380
mov ecx, eax
mov eax, dword [ecx]
mov dword [ebp - 4], 0
call dword [eax + 4]
push 3
push str.libsystem::environment::system_directory
push dword [0x483994]
lea ecx, [ebp - 0x2b8]
mov dword [ebp - 0x2bc], eax
call fcn.0040abf0
lea ecx, [ebp - 0x2bc]
mov byte [ebp - 4], 1
push ecx
mov ecx, eax
call fcn.004047a0
lea ecx, [ebp - 0x2b8]
call fcn.0040b170
lea ecx, [ebp - 0x98]
call fcn.00409700
xor eax, eax
mov dword [edi + 0x10], 0
mov dword [edi + 0x14], 7
mov word [edi], ax
jmp 0x40feb6
lea ecx, [ebp - 0x2bd]
push ecx
push eax
lea ecx, [ebp - 0x2cc]
call fcn.0040eb70
mov ebx, dword [ebp - 0x2c8]
mov esi, dword [ebp - 0x2cc]
sub ebx, esi
sar ebx, 1
push ebx
push esi
mov dword [ebp - 4], 2
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
jne 0x40fed4
mov eax, dword [0x483994]
test eax, eax
je 0x40fe6c
cmp byte [eax + 4], 3
ja 0x40fe6c
push 0x463cf4
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea ecx, [ebp - 0x98]
call fcn.00409380
mov edx, dword [eax]
mov ecx, eax
mov byte [ebp - 4], 3
call dword [edx + 4]
push 3
push str.libsystem::environment::system_directory
push dword [0x483994]
lea ecx, [ebp - 0x2b8]
mov dword [ebp - 0x2bc], eax
call fcn.0040abf0
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x2bc]
push ecx
mov ecx, eax
call fcn.004047a0
lea ecx, [ebp - 0x2b8]
call fcn.0040b170
lea ecx, [ebp - 0x98]
call fcn.00409700
mov dword [edi + 0x10], 0
xor eax, eax
mov dword [edi + 0x14], 7
mov word [edi], ax
test esi, esi
je 0x40feb6
mov ecx, dword [ebp - 0x2c4]
mov eax, esi
sub ecx, esi
and ecx, 0xfffffffe
cmp ecx, 0x1000
jb 0x40feac
mov esi, dword [esi - 4]
add ecx, 0x23
sub eax, esi
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x410073
push ecx
push esi
call fcn.0042777b
add esp, 8
mov eax, edi
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.00427a1e
mov esp, ebp
pop ebp
ret
cmp ebx, eax
jae 0x40ff3c
mov eax, dword [0x483994]
test eax, eax
je 0x40fe6c
cmp byte [eax + 4], 3
ja 0x40fe6c
push dword [0x463cb0]
lea ecx, [ebp - 0x98]
push 0
push 0x32
call fcn.00409180
mov dword [ebp - 0x98], 0x463a3c
lea ecx, [ebp - 0x98]
mov byte [ebp - 4], 5
call fcn.0040a7c0
push 3
push str.libsystem::environment::system_directory
push dword [0x483994]
lea ecx, [ebp - 0x2b8]
mov dword [ebp - 0x2bc], eax
call fcn.0040abf0
mov byte [ebp - 4], 6
jmp 0x40fe48
xor ecx, ecx
mov dword [edi + 0x10], 0
mov dword [edi + 0x14], 7
lea eax, [esi + eax*2]
mov word [edi], cx
xor edx, edx
mov byte [ebp - 4], 7
xor ebx, ebx
mov dword [ebp - 0x18], edx
mov word [ebp - 0x28], bx
mov ecx, 7
mov dword [ebp - 0x14], ecx
cmp esi, eax
je 0x40ff81
sub eax, esi
lea ecx, [ebp - 0x28]
sar eax, 1
push eax
push esi
call fcn.00403640
mov ecx, dword [ebp - 0x14]
mov edx, dword [ebp - 0x18]
xor eax, eax
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x2c], 7
mov word [ebp - 0x40], ax
mov byte [ebp - 4], 9
lea eax, [ebp - 0x28]
cmp ecx, 8
jb 0x40ffa4
mov eax, dword [ebp - 0x28]
push edx
push eax
push 0
push 0
lea ecx, [ebp - 0x40]
call fcn.00408590
push eax
mov ecx, edi
call fcn.00402610
mov edx, dword [ebp - 0x2c]
cmp edx, 8
jb 0x40fff4
mov ecx, dword [ebp - 0x40]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40ffea
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x410078
push edx
push ecx
call fcn.0042777b
add esp, 8
mov edx, dword [ebp - 0x14]
xor eax, eax
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x2c], 7
mov word [ebp - 0x40], ax
cmp edx, 8
jb 0x41003e
mov ecx, dword [ebp - 0x28]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x410034
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x410078
push edx
push ecx
call fcn.0042777b
add esp, 8
test esi, esi
je 0x40feb6
mov ecx, dword [ebp - 0x2c4]
mov eax, esi
sub ecx, esi
and ecx, 0xfffffffe
cmp ecx, 0x1000
jb 0x40feac
mov esi, dword [esi - 4]
add ecx, 0x23
sub eax, esi
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x40feac
call fcn.004432c6
call fcn.004432c6
int3