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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x408d89
mov eax, dword fs:[0]
push eax
sub esp, 0x330
push esi
push edi
lea edi, [ebp - 0x33c]
mov ecx, 0xcc
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.00407824
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.00407824
push eax
push 0x40a330
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 - 0x2ac]
push eax
call fcn.00404ce0
add esp, 0xc
mov dword [ebp - 0x2f8], eax
mov ecx, dword [ebp - 0x2f8]
mov dword [ebp - 0x2fc], ecx
mov dword [ebp - 4], 0
mov ecx, dword [ebp - 0x2fc]
call fcn.00404fc0
push eax
call fcn.00401120
add esp, 4
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x2ac]
call fcn.00404f80
jmp 0x401ee6
mov esi, esp
lea edx, [ebp - 0x21c]
push edx
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
cmp esi, esp
call fcn.00407824
test eax, eax
jne 0x401f37
mov dword [ebp - 0x2bc], str.PathRemoveFileSpec_failed
mov esi, esp
lea eax, [ebp - 0x2bc]
push eax
lea ecx, [ebp - 0x2b8]
call dword [sym.imp.MSVCR100.dll_public:_void___thiscall_std::exception::constructor_char_const__const_const__]
cmp esi, esp
call fcn.00407824
push 0x40c270
lea ecx, [ebp - 0x2b8]
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 - 0x2c4]
push ecx
call fcn.00404ce0
add esp, 0xc
mov dword [ebp - 0x300], eax
mov edx, dword [ebp - 0x300]
mov dword [ebp - 0x304], edx
mov dword [ebp - 4], 1
mov ecx, dword [ebp - 0x304]
call fcn.00404fc0
push eax
call fcn.00401120
add esp, 4
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x2c4]
call fcn.00404f80
jmp 0x401fa0
push str.AppleVersions
lea eax, [ebp - 0x21c]
push eax
lea ecx, [ebp - 0x240]
call fcn.00404a80
mov dword [ebp - 0x308], eax
mov ecx, dword [ebp - 0x308]
mov dword [ebp - 0x30c], ecx
mov dword [ebp - 4], 2
mov edx, dword [ebp - 0x30c]
push edx
lea eax, [ebp - 0x260]
push eax
call fcn.00406590
add esp, 0xc
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x240]
call fcn.00404b50
push str..dll
lea ecx, [ebp - 0x260]
call fcn.00404bf0
movzx ecx, byte [section..data]
test ecx, ecx
je 0x40206d
lea ecx, [ebp - 0x260]
call fcn.00404c20
push eax
push str.potential_path_to_AppleVersions_DLL_is__S
lea edx, [ebp - 0x2cc]
push edx
call fcn.00404ce0
add esp, 0xc
mov dword [ebp - 0x310], eax
mov eax, dword [ebp - 0x310]
mov dword [ebp - 0x314], eax
mov byte [ebp - 4], 5
mov ecx, dword [ebp - 0x314]
call fcn.00404fc0
push eax
call fcn.00401120
add esp, 4
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x2cc]
call fcn.00404f80
jmp 0x40206d
lea ecx, [ebp - 0x260]
call fcn.00404c20
mov esi, esp
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp esi, esp
call fcn.00407824
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.00407824
mov dword [ebp - 0x26c], eax
cmp dword [ebp - 0x26c], 2
je 0x4020ce
mov ecx, dword [ebp - 0x26c]
push ecx
push 0x40a40c
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 - 0x2d4]
push edx
call fcn.00404ce0
add esp, 8
mov dword [ebp - 0x318], eax
mov eax, dword [ebp - 0x318]
mov dword [ebp - 0x31c], eax
mov byte [ebp - 4], 6
mov ecx, dword [ebp - 0x31c]
call fcn.00404fc0
push eax
call fcn.00401120
add esp, 4
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x2d4]
call fcn.00404f80
jmp 0x402155
mov esi, esp
lea ecx, [ebp - 0x21c]
push ecx
call dword [sym.imp.KERNEL32.dll_SetDllDirectoryW]
cmp esi, esp
call fcn.00407824
test eax, eax
jne 0x402191
mov esi, esp
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp esi, esp
call fcn.00407824
push eax
push 0x40a484
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 0x40a494
lea ecx, [ebp - 0x2dc]
push ecx
call fcn.00404ce0
add esp, 0xc
mov dword [ebp - 0x320], eax
mov edx, dword [ebp - 0x320]
mov dword [ebp - 0x324], edx
mov byte [ebp - 4], 7
mov ecx, dword [ebp - 0x324]
call fcn.00404fc0
push eax
call fcn.00401120
add esp, 4
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x2dc]
call fcn.00404f80
jmp 0x4021f4
jmp 0x402478
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.00407824
mov dword [ebp - 0x270], eax
cmp dword [ebp - 0x270], 0
je 0x402324
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
lea edx, [ebp - 0x21c]
push edx
push str._s_bin
lea eax, [ebp - 0x27c]
push eax
call fcn.00404e40
add esp, 0xc
mov byte [ebp - 4], 8
lea ecx, [ebp - 0x27c]
call fcn.00404fc0
mov esi, esp
push eax
call dword [sym.imp.KERNEL32.dll_SetDllDirectoryW]
cmp esi, esp
call fcn.00407824
test eax, eax
jne 0x4022a8
mov esi, esp
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp esi, esp
call fcn.00407824
push eax
push 0x40a54c
push 0x118
call fcn.00401a50
add esp, 0xc
movzx ecx, byte [section..data]
test ecx, ecx
je 0x402310
lea ecx, [ebp - 0x27c]
call fcn.00404fc0
push eax
push 0x40a55c
lea edx, [ebp - 0x2e4]
push edx
call fcn.00404ce0
add esp, 0xc
mov dword [ebp - 0x328], eax
mov eax, dword [ebp - 0x328]
mov dword [ebp - 0x32c], eax
mov byte [ebp - 4], 9
mov ecx, dword [ebp - 0x32c]
call fcn.00404fc0
push eax
call fcn.00401120
add esp, 4
mov byte [ebp - 4], 8
lea ecx, [ebp - 0x2e4]
call fcn.00404f80
jmp 0x402310
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x27c]
call fcn.00404f80
jmp 0x402478
movzx ecx, byte [section..data]
test ecx, ecx
je 0x402340
push str.environment_variable_AppleApplicationSupportSDK_NOT_defined__falling_back_to_customer_installation
call fcn.00401120
add esp, 4
jmp 0x402340
push str.Apple_Application_Support
lea edx, [ebp - 0x2a0]
push edx
call fcn.00402530
add esp, 8
mov byte [ebp - 4], 0xa
movzx eax, byte [section..data]
test eax, eax
je 0x4023c0
lea ecx, [ebp - 0x2a0]
call fcn.00404c20
push eax
push str.AAS_path_is__S
lea ecx, [ebp - 0x2ec]
push ecx
call fcn.00404ce0
add esp, 0xc
mov dword [ebp - 0x330], eax
mov edx, dword [ebp - 0x330]
mov dword [ebp - 0x334], edx
mov byte [ebp - 4], 0xb
mov ecx, dword [ebp - 0x334]
call fcn.00404fc0
push eax
call fcn.00401120
add esp, 4
mov byte [ebp - 4], 0xa
lea ecx, [ebp - 0x2ec]
call fcn.00404f80
jmp 0x4023c0
lea ecx, [ebp - 0x2a0]
call fcn.00404c20
mov esi, esp
push eax
call dword [sym.imp.KERNEL32.dll_SetDllDirectoryW]
cmp esi, esp
call fcn.00407824
test eax, eax
jne 0x402401
mov esi, esp
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp esi, esp
call fcn.00407824
push eax
push 0x40a638
push 0x123
call fcn.00401a50
add esp, 0xc
movzx eax, byte [section..data]
test eax, eax
je 0x402469
lea ecx, [ebp - 0x2a0]
call fcn.00404c20
push eax
push str.called_SetDllDirectoryW_successfully_with_path__S
lea ecx, [ebp - 0x2f4]
push ecx
call fcn.00404ce0
add esp, 0xc
mov dword [ebp - 0x338], eax
mov edx, dword [ebp - 0x338]
mov dword [ebp - 0x33c], edx
mov byte [ebp - 4], 0xc
mov ecx, dword [ebp - 0x33c]
call fcn.00404fc0
push eax
call fcn.00401120
add esp, 4
mov byte [ebp - 4], 0xa
lea ecx, [ebp - 0x2f4]
call fcn.00404f80
jmp 0x402469
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x2a0]
call fcn.00404b50
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x260]
call fcn.00404b50
push edx
mov ecx, ebp
push eax
lea edx, [0x4024c4]
call fcn.00407847
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.00407815
add esp, 0x33c
cmp ebp, esp
call fcn.00407824
mov esp, ebp
pop ebp
ret