Function at 0x1002e440
Capabilities:
Get common file path
Query environment variable

Disassembly:
sub esp, 0x158
push ebx
push ebp
push esi
push edi
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x65]
mov byte [esp + 0x64], 0
rep stosd dword es:[edi], eax
mov ebp, dword [esp + 0x16c]
mov dword [esp + 0x14], 0x1004a914
stosw word es:[edi], ax
stosb byte es:[edi], al
mov dword [esp + 0x18], 0x10
mov dword [esp + 0x1c], 0x1004a92c
mov dword [esp + 0x20], 7
mov dword [esp + 0x24], 0x1004a944
mov dword [esp + 0x28], 2
mov dword [esp + 0x2c], 0x1004a960
mov dword [esp + 0x30], 5
mov dword [esp + 0x34], 0x1004a980
mov dword [esp + 0x38], 0x26
mov dword [esp + 0x3c], 0x1004a99c
mov dword [esp + 0x40], 0xffffffff
mov dword [esp + 0x44], 0x1004a9b4
mov dword [esp + 0x48], 0xfffffffe
mov dword [esp + 0x4c], 0x1004a9cc
mov dword [esp + 0x50], 0xfffffffd
mov dword [esp + 0x54], 0x1004a9e0
mov dword [esp + 0x58], 0xfffffffc
mov dword [esp + 0x5c], 0x1004a9f4
mov dword [esp + 0x60], 0xfffffffb
xor ebx, ebx
lea esi, [esp + 0x14]
mov edx, dword [esi]
or ecx, 0xffffffff
mov edi, edx
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push edx
push ebp
call fcn.1001fec0
add esp, 0xc
test eax, eax
je 0x1002e577
inc ebx
add esi, 8
cmp ebx, 0xa
jb 0x1002e50c
cmp byte [ebp], 0x25
jne 0x1002e74c
mov esi, dword [esp + 0x174]
mov edx, dword [esp + 0x170]
mov ecx, esi
xor eax, eax
mov ebx, ecx
mov edi, edx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, ebx
push esi
and ecx, 3
push edx
rep stosb byte es:[edi], al
push ebp
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
cmp esi, eax
pop edi
sbb eax, eax
pop esi
pop ebp
inc eax
pop ebx
add esp, 0x158
ret
cmp ebx, 0xa
jae 0x1002e532
mov eax, dword [esp + ebx*8 + 0x18]
test eax, eax
jl 0x1002e5b2
lea ecx, [esp + 0x64]
push ecx
push 0
push 0
push eax
push 0
call dword [sym.imp.SHFOLDER.dll_SHGetFolderPathA]
test eax, eax
jl 0x1002e669
lea edx, [esp + 0x64]
push 0x104
lea eax, [esp + 0x68]
push edx
push eax
jmp 0x1002e65f
add eax, 5
cmp eax, 4
ja case.default.0x1002e5be
jmp dword [eax*4 + 0x1002e7b4]
lea ecx, [esp + 0x64]
push ecx
push 0
push 0
push 0x2e
push 0
call dword [sym.imp.SHFOLDER.dll_SHGetFolderPathA]
test eax, eax
jl 0x1002e669
mov esi, dword [sym.imp.MSVCRT.dll_strrchr]
lea edx, [esp + 0x64]
push 0x5c
push edx
call esi
add esp, 8
test eax, eax
je 0x1002e669
lea eax, [esp + 0x64]
push 0x5c
push eax
call esi
mov cl, byte [eax]
add esp, 8
test cl, cl
je 0x1002e650
mov byte [eax], 0
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x1002e608
jmp 0x1002e650
lea eax, [esp + 0x64]
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
jmp 0x1002e649
lea eax, [esp + 0x64]
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
jmp 0x1002e649
lea eax, [esp + 0x64]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
cmp eax, 0x104
jae 0x1002e669
lea ecx, [esp + 0x64]
push 0x104
lea edx, [esp + 0x68]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_GetShortPathNameA]
test eax, eax
jne case.default.0x1002e5be
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x158
ret
mov eax, dword [str.C:IBMTOOLS]
mov ecx, dword [0x1004aa04]
mov edx, dword [0x1004aa08]
mov dword [esp + 0x64], eax
mov dword [esp + 0x68], ecx
mov dword [esp + 0x6c], edx
mov ebx, dword [esp + ebx*8 + 0x14]
or ecx, 0xffffffff
mov edi, ebx
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov edi, ecx
or ecx, 0xffffffff
add edi, ebp
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea edi, [esp + 0x64]
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
add edx, ecx
mov ecx, dword [esp + 0x174]
cmp edx, ecx
jae 0x1002e669
mov edx, dword [esp + 0x170]
mov esi, ecx
mov edi, edx
mov dword [esp + 0x10], 1
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, esi
and ecx, 3
rep stosb byte es:[edi], al
lea edi, [esp + 0x64]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, ebx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov edi, ecx
or ecx, 0xffffffff
add edi, ebp
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
mov eax, dword [esp + 0x10]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x158
ret
mov edi, ebp
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
mov eax, dword [esp + 0x174]
not ecx
dec ecx
cmp ecx, eax
jae 0x1002e669
mov edx, dword [esp + 0x170]
mov ecx, eax
mov esi, ecx
xor eax, eax
mov edi, edx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, esi
and ecx, 3
rep stosb byte es:[edi], al
mov edi, ebp
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, 1
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x158
ret