Function at 0x401df0
Capabilities:
Check if file exists
Get file attributes
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x408ea9
mov eax, dword fs:[0]
push eax
sub esp, 0x334
push esi
push edi
lea edi, [ebp - 0x340]
mov ecx, 0xcd
mov eax, 0xcccccccc
rep stosd dword es:[edi], eax
mov eax, dword [0x40e06c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, esp
push 0x104
lea eax, [ebp - 0x21c]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
cmp esi, esp
call fcn.004078f8
mov dword [ebp - 0x224], eax
cmp dword [ebp - 0x224], 0
jne 0x401e7d
mov esi, esp
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp esi, esp
call fcn.004078f8
push eax
push 0x40a340
push 0xdc
call fcn.00401a50
add esp, 0xc
movzx ecx, byte [section..data]
test ecx, ecx
je 0x401ee6
lea edx, [ebp - 0x21c]
push edx
push str.EXE_containing_current_process_is__S
lea eax, [ebp - 0x2b0]
push eax
call fcn.00404dc0
add esp, 0xc
mov dword [ebp - 0x2fc], eax
mov ecx, dword [ebp - 0x2fc]
mov dword [ebp - 0x300], ecx
mov dword [ebp - 4], 0
mov ecx, dword [ebp - 0x300]
call fcn.004050a0
push eax
call fcn.00401120
add esp, 4
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x2b0]
call fcn.00405060
jmp 0x401ee6
mov esi, esp
lea edx, [ebp - 0x21c]
push edx
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
cmp esi, esp
call fcn.004078f8
test eax, eax
jne 0x401f37
mov dword [ebp - 0x2c0], str.PathRemoveFileSpec_failed
mov esi, esp
lea eax, [ebp - 0x2c0]
push eax
lea ecx, [ebp - 0x2bc]
call dword [sym.imp.MSVCR100.dll_public:_void___thiscall_std::exception::constructor_char_const__const_const__]
cmp esi, esp
call fcn.004078f8
push 0x40c380
lea ecx, [ebp - 0x2bc]
push ecx
call sub.MSVCR100.dll__CxxThrowException
movzx edx, byte [section..data]
test edx, edx
je 0x401fa0
lea eax, [ebp - 0x21c]
push eax
push str.parent_of_EXE_containing_current_process_is__S
lea ecx, [ebp - 0x2c8]
push ecx
call fcn.00404dc0
add esp, 0xc
mov dword [ebp - 0x304], eax
mov edx, dword [ebp - 0x304]
mov dword [ebp - 0x308], edx
mov dword [ebp - 4], 1
mov ecx, dword [ebp - 0x308]
call fcn.004050a0
push eax
call fcn.00401120
add esp, 4
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x2c8]
call fcn.00405060
jmp 0x401fa0
push str.AppleVersions
lea eax, [ebp - 0x21c]
push eax
lea ecx, [ebp - 0x240]
call fcn.00404b60
mov dword [ebp - 0x30c], eax
mov ecx, dword [ebp - 0x30c]
mov dword [ebp - 0x310], ecx
mov dword [ebp - 4], 2
mov edx, dword [ebp - 0x310]
push edx
lea eax, [ebp - 0x260]
push eax
call fcn.00406670
add esp, 0xc
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x240]
call fcn.00404c30
push str..dll
lea ecx, [ebp - 0x260]
call fcn.00404cd0
movzx ecx, byte [section..data]
test ecx, ecx
je 0x40206d
lea ecx, [ebp - 0x260]
call fcn.00404d00
push eax
push str.potential_path_to_AppleVersions_DLL_is__S
lea edx, [ebp - 0x2d0]
push edx
call fcn.00404dc0
add esp, 0xc
mov dword [ebp - 0x314], eax
mov eax, dword [ebp - 0x314]
mov dword [ebp - 0x318], eax
mov byte [ebp - 4], 5
mov ecx, dword [ebp - 0x318]
call fcn.004050a0
push eax
call fcn.00401120
add esp, 4
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x2d0]
call fcn.00405060
jmp 0x40206d
lea ecx, [ebp - 0x260]
call fcn.00404d00
mov esi, esp
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp esi, esp
call fcn.004078f8
mov dword [ebp - 0x268], eax
cmp dword [ebp - 0x268], 0xffffffff
jne 0x4020ea
mov esi, esp
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp esi, esp
call fcn.004078f8
mov dword [ebp - 0x26c], eax
cmp dword [ebp - 0x26c], 2
je 0x4020ce
mov ecx, dword [ebp - 0x26c]
push ecx
push 0x40a41c
push 0xed
call fcn.00401a50
add esp, 0xc
movzx edx, byte [section..data]
test edx, edx
je 0x4020ea
push str.found_no_file_system_object_along_path_to_AppleVersions_DLL
call fcn.00401120
add esp, 4
jmp 0x4020ea
mov eax, dword [ebp - 0x268]
and eax, 0x10
jne 0x4021f9
movzx ecx, byte [section..data]
test ecx, ecx
je 0x402155
push str.found_file_along_path_to_AppleVersions_DLL
lea edx, [ebp - 0x2d8]
push edx
call fcn.00404dc0
add esp, 8
mov dword [ebp - 0x31c], eax
mov eax, dword [ebp - 0x31c]
mov dword [ebp - 0x320], eax
mov byte [ebp - 4], 6
mov ecx, dword [ebp - 0x320]
call fcn.004050a0
push eax
call fcn.00401120
add esp, 4
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x2d8]
call fcn.00405060
jmp 0x402155
mov esi, esp
lea ecx, [ebp - 0x21c]
push ecx
call dword [sym.imp.KERNEL32.dll_SetDllDirectoryW]
cmp esi, esp
call fcn.004078f8
test eax, eax
jne 0x402191
mov esi, esp
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp esi, esp
call fcn.004078f8
push eax
push 0x40a494
push 0x105
call fcn.00401a50
add esp, 0xc
movzx edx, byte [section..data]
test edx, edx
je 0x4021f4
lea eax, [ebp - 0x21c]
push eax
push 0x40a4a4
lea ecx, [ebp - 0x2e0]
push ecx
call fcn.00404dc0
add esp, 0xc
mov dword [ebp - 0x324], eax
mov edx, dword [ebp - 0x324]
mov dword [ebp - 0x328], edx
mov byte [ebp - 4], 7
mov ecx, dword [ebp - 0x328]
call fcn.004050a0
push eax
call fcn.00401120
add esp, 4
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x2e0]
call fcn.00405060
jmp 0x4021f4
jmp 0x402489
mov esi, esp
push 0x104
lea eax, [ebp - 0x21c]
push eax
push str.AppleApplicationSupportSDK
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
cmp esi, esp
call fcn.004078f8
mov dword [ebp - 0x270], eax
cmp dword [ebp - 0x270], 0
je 0x402335
movzx ecx, byte [section..data]
test ecx, ecx
je 0x402248
push str.environment_variable_AppleApplicationSupportSDK_is_defined
call fcn.00401120
add esp, 4
jmp 0x402248
mov dword [ebp - 0x274], str.Program_Files__x86_Common_FilesAppleApple_Application_Support
mov edx, dword [ebp - 0x274]
push edx
lea eax, [ebp - 0x21c]
push eax
push str._s_s
lea ecx, [ebp - 0x280]
push ecx
call fcn.00404f20
add esp, 0x10
mov byte [ebp - 4], 8
lea ecx, [ebp - 0x280]
call fcn.004050a0
mov esi, esp
push eax
call dword [sym.imp.KERNEL32.dll_SetDllDirectoryW]
cmp esi, esp
call fcn.004078f8
test eax, eax
jne 0x4022b9
mov esi, esp
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp esi, esp
call fcn.004078f8
push eax
push 0x40a5dc
push 0x120
call fcn.00401a50
add esp, 0xc
movzx edx, byte [section..data]
test edx, edx
je 0x402321
lea ecx, [ebp - 0x280]
call fcn.004050a0
push eax
push 0x40a5ec
lea eax, [ebp - 0x2e8]
push eax
call fcn.00404dc0
add esp, 0xc
mov dword [ebp - 0x32c], eax
mov ecx, dword [ebp - 0x32c]
mov dword [ebp - 0x330], ecx
mov byte [ebp - 4], 9
mov ecx, dword [ebp - 0x330]
call fcn.004050a0
push eax
call fcn.00401120
add esp, 4
mov byte [ebp - 4], 8
lea ecx, [ebp - 0x2e8]
call fcn.00405060
jmp 0x402321
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x280]
call fcn.00405060
jmp 0x402489
movzx edx, byte [section..data]
test edx, edx
je 0x402351
push str.environment_variable_AppleApplicationSupportSDK_NOT_defined__falling_back_to_customer_installation
call fcn.00401120
add esp, 4
jmp 0x402351
push str.Apple_Application_Support
lea eax, [ebp - 0x2a4]
push eax
call fcn.00402540
add esp, 8
mov byte [ebp - 4], 0xa
movzx ecx, byte [section..data]
test ecx, ecx
je 0x4023d1
lea ecx, [ebp - 0x2a4]
call fcn.00404d00
push eax
push str.AAS_path_is__S
lea edx, [ebp - 0x2f0]
push edx
call fcn.00404dc0
add esp, 0xc
mov dword [ebp - 0x334], eax
mov eax, dword [ebp - 0x334]
mov dword [ebp - 0x338], eax
mov byte [ebp - 4], 0xb
mov ecx, dword [ebp - 0x338]
call fcn.004050a0
push eax
call fcn.00401120
add esp, 4
mov byte [ebp - 4], 0xa
lea ecx, [ebp - 0x2f0]
call fcn.00405060
jmp 0x4023d1
lea ecx, [ebp - 0x2a4]
call fcn.00404d00
mov esi, esp
push eax
call dword [sym.imp.KERNEL32.dll_SetDllDirectoryW]
cmp esi, esp
call fcn.004078f8
test eax, eax
jne 0x402412
mov esi, esp
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp esi, esp
call fcn.004078f8
push eax
push 0x40a6c8
push 0x12b
call fcn.00401a50
add esp, 0xc
movzx ecx, byte [section..data]
test ecx, ecx
je 0x40247a
lea ecx, [ebp - 0x2a4]
call fcn.00404d00
push eax
push str.called_SetDllDirectoryW_successfully_with_path__S
lea edx, [ebp - 0x2f8]
push edx
call fcn.00404dc0
add esp, 0xc
mov dword [ebp - 0x33c], eax
mov eax, dword [ebp - 0x33c]
mov dword [ebp - 0x340], eax
mov byte [ebp - 4], 0xc
mov ecx, dword [ebp - 0x340]
call fcn.004050a0
push eax
call fcn.00401120
add esp, 4
mov byte [ebp - 4], 0xa
lea ecx, [ebp - 0x2f8]
call fcn.00405060
jmp 0x40247a
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x2a4]
call fcn.00404c30
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x260]
call fcn.00404c30
push edx
mov ecx, ebp
push eax
lea edx, [0x4024d4]
call fcn.0040791b
pop eax
pop edx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004078e9
add esp, 0x340
cmp ebp, esp
call fcn.004078f8
mov esp, ebp
pop ebp
ret