Function at 0x18014098
Capabilities:
Set current directory
Set environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x224
mov eax, dword [0x180af1d0]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov edi, ecx
lea esi, [edi + 0x84]
mov eax, dword [esi + 0x10]
sub eax, dword [esi + 0xc]
push 2
pop ebx
push 0x30
cdq
pop ecx
idiv ecx
mov dword [ebp - 0x214], edi
test eax, eax
je 0x180140de
push 0
call fcn.1804baac
xor ebx, ebx
cmp dword [eax + 0x14], ebx
setne bl
call fcn.18052c3a
mov cl, byte [eax + 1]
movzx eax, byte [edi + 0x11]
push ebx
push eax
mov al, byte [edi + 0x9d]
mov bl, cl
mov ecx, dword [edi + 0xc]
call fcn.180155a7
mov byte [edi + 0x9c], al
movzx eax, byte [0x180b5839]
pop ecx
neg eax
pop ecx
sbb eax, eax
mov esi, 0x180b5ae0
and eax, esi
push 8
pop ebx
je 0x18014159
push 1
push ebx
mov dword [ebp - 0x224], eax
call fcn.18001cc0
mov dword [ebp - 0x220], eax
movzx eax, byte [edi + 0x9c]
push eax
push str._is_machine:__d_
lea eax, [ebp - 0x224]
mov dword [ebp - 0x21c], 1
mov dword [ebp - 0x218], ebx
call fcn.18001000
pop ecx
pop ecx
cmp byte [edi + 0x9c], 0
mov eax, 0x1809e4fc
jne 0x1801416c
mov eax, 0x1809e500
push eax
push str.CatalinaGroupUpdateIsMachine
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
test eax, eax
jne 0x18014181
call fcn.1800d3ff
mov al, byte [edi + 0x9c]
cmp al, byte [0x180b583b]
je 0x1801419b
call fcn.1801a09b
push eax
call fcn.18011fe3
pop ecx
cmp byte [edi + 0x9c], 0
je 0x180141b1
call fcn.1800e1e9
test al, al
je 0x180141b1
mov al, 1
jmp 0x180141b3
xor al, al
push eax
call fcn.18036f10
xor eax, eax
mov dword [esp], 0x206
push eax
mov word [ebp - 0x210], ax
lea eax, [ebp - 0x20e]
push eax
call fcn.18076d30
mov edi, dword [edi]
add esp, 0xc
push 0x104
lea eax, [ebp - 0x210]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x18014213
lea edi, [ebp - 0x210]
call fcn.18008aee
test al, al
mov eax, edi
jne 0x1801421d
push 0x208
push 0
push eax
call fcn.18076d30
add esp, 0xc
call fcn.1800d3ff
jmp 0x18014304
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
test eax, eax
je 0x18014213
movzx eax, byte [0x180b5839]
neg eax
sbb eax, eax
and eax, esi
je 0x18014272
push 3
pop esi
push esi
push ebx
mov dword [ebp - 0x224], eax
call fcn.18001cc0
mov dword [ebp - 0x220], eax
lea eax, [ebp - 0x210]
push eax
push 0x1809e504
lea eax, [ebp - 0x224]
mov dword [ebp - 0x21c], esi
mov dword [ebp - 0x218], ebx
call fcn.18001000
pop ecx
pop ecx
mov esi, dword [ebp - 0x214]
mov ecx, esi
call fcn.18014aad
push eax
call fcn.18011fe3
movzx eax, byte [esi + 0x9c]
pop ecx
push eax
call fcn.180153ff
pop ecx
push eax
call fcn.18011fe3
mov eax, dword [esi + 0xc]
pop ecx
cmp eax, 0x1e
ja 0x180142aa
call fcn.1801497f
jmp 0x180142ac
mov al, 1
test al, al
je 0x180142c1
push esi
call fcn.180149be
test al, al
je 0x180142c1
mov eax, 0xa0430607
jmp 0x18014304
lea eax, [ebp - 0x210]
push eax
lea eax, [ebp - 0x214]
call fcn.18003b93
lea eax, [ebp - 0x214]
push eax
mov eax, dword [esi + 0xc]
mov ebx, esi
call fcn.18014a28
mov esi, eax
mov eax, dword [ebp - 0x214]
add eax, 0xfffffff0
call fcn.18003e1e
push esi
call fcn.18011ff7
movzx eax, al
neg eax
sbb eax, eax
pop ecx
and eax, esi
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.180761c5
leave
ret