Function at 0x401000
Capabilities:
Query environment variable

Disassembly:
push ebp
lea ebp, [esp - 0x2a4]
sub esp, 0x324
mov eax, dword [0x58b7c8]
xor eax, ebp
mov dword [ebp + 0x2a0], eax
mov eax, dword [ebp + 0x2ac]
push ebx
push esi
push edi
xor ebx, ebx
mov esi, 0x103
push esi
mov dword [ebp - 0x7c], eax
lea eax, [ebp + 0x19d]
push ebx
push eax
mov edi, ecx
mov dword [ebp - 0x74], ebx
mov byte [ebp + 0x19c], bl
call sub.MSVCR90.dll_memset
push esi
lea eax, [ebp - 0x6b]
push ebx
push eax
mov byte [ebp - 0x6c], bl
call sub.MSVCR90.dll_memset
push esi
lea eax, [ebp + 0x99]
push ebx
push eax
mov byte [ebp + 0x98], bl
call sub.MSVCR90.dll_memset
add esp, 0x24
mov dword [ebp - 0x70], ebx
cmp dword [ebp - 0x7c], ebx
jne 0x401084
push str.Internal_Error:_Invalid_borrow_cache_return_buffer_n
call dword [sym.imp.MSVCR90.dll_printf]
jmp 0x401270
push esi
lea eax, [ebp + 0x98]
push edi
push eax
call dword [sym.imp.MSVCR90.dll_strncpy]
mov esi, dword [sym.imp.KERNEL32.dll_LoadLibraryA]
add esp, 0xc
push str.shfolder.dll
mov byte [ebp + 0x19b], bl
call esi
mov dword [ebp - 0x78], eax
cmp eax, ebx
je 0x401127
push str.SHGetFolderPathA
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp eax, ebx
je 0x40111c
lea ecx, [ebp - 0x6c]
push ecx
push ebx
push ebx
push 0x8023
push ebx
call eax
test eax, eax
jne 0x40111c
lea eax, [ebp + 0x98]
push eax
call sub.MSVCR90.dll_strlen
mov edi, eax
lea eax, [ebp - 0x6c]
push eax
call sub.MSVCR90.dll_strlen
add edi, eax
pop ecx
pop ecx
cmp edi, 0x104
jae 0x40111c
lea eax, [ebp + 0x98]
push eax
lea eax, [ebp - 0x6c]
push eax
lea eax, [ebp + 0x19c]
push 0x55d5cc
push eax
call dword [sym.imp.MSVCR90.dll_sprintf]
add esp, 0x10
mov dword [ebp - 0x70], 1
push dword [ebp - 0x78]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
jmp 0x40118d
push str.ALLUSERSPROFILE
call dword [sym.imp.MSVCR90.dll_getenv]
pop ecx
mov dword [ebp - 0x78], eax
cmp eax, ebx
je 0x40118d
push eax
call sub.MSVCR90.dll_strlen
mov edi, eax
mov dword [esp], str.Application_Data_
call sub.MSVCR90.dll_strlen
add edi, eax
lea eax, [ebp + 0x98]
push eax
call sub.MSVCR90.dll_strlen
add eax, edi
pop ecx
pop ecx
cmp eax, 0x104
jae 0x40118d
lea eax, [ebp + 0x98]
push eax
push dword [ebp - 0x78]
lea eax, [ebp + 0x19c]
push str._sApplication_Data_s
push eax
call dword [sym.imp.MSVCR90.dll_sprintf]
add esp, 0x10
mov dword [ebp - 0x70], 1
cmp dword [ebp + 0x2b0], 1
mov edi, dword [sym.imp.MSVCR90.dll_printf]
jne 0x4011c4
push str.shell32.dll
call esi
mov esi, eax
cmp esi, ebx
je 0x4011ba
push str.SHCreateDirectoryExA
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x74], eax
jmp 0x4011c6
push str.Internal_Error:_Loading_the_library_failed_n
call edi
pop ecx
jmp 0x4011c6
mov esi, ebx
cmp dword [ebp - 0x70], ebx
je 0x40120a
lea eax, [ebp + 0x19c]
push ebx
push eax
call dword [sym.imp.MSVCR90.dll__access]
pop ecx
pop ecx
cmp eax, 0xffffffff
jne 0x401205
cmp dword [ebp + 0x2b0], 1
jne 0x40120a
cmp dword [ebp - 0x74], ebx
je 0x40120a
push ebx
lea eax, [ebp + 0x19c]
push eax
push ebx
call dword [ebp - 0x74]
test eax, eax
jne 0x40120a
mov dword [ebp - 0x70], 1
cmp dword [ebp - 0x70], ebx
jne 0x401250
lea eax, [ebp + 0x19c]
push 0x55d534
push eax
call sub.MSVCR90.dll_strcpy
xor eax, eax
inc eax
pop ecx
pop ecx
mov dword [ebp - 0x70], eax
cmp dword [ebp + 0x2b0], eax
jne 0x401250
cmp dword [ebp - 0x74], ebx
je 0x401250
push ebx
lea eax, [ebp + 0x19c]
push eax
push ebx
call dword [ebp - 0x74]
test eax, eax
je 0x401250
lea eax, [ebp + 0x19c]
push eax
push str.Unable_to_create_a_borrow_cache_directory__s_n
call edi
pop ecx
pop ecx
cmp esi, ebx
je 0x40125b
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
cmp dword [ebp - 0x70], ebx
je 0x401271
lea eax, [ebp + 0x19c]
push eax
push dword [ebp - 0x7c]
call sub.MSVCR90.dll_strcpy
pop ecx
pop ecx
mov ecx, dword [ebp + 0x2a0]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00472edc
add ebp, 0x2a4
leave
ret