Function at 0x47d960
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x108
mov eax, dword [0x581900]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 8]
test esi, esi
jne 0x47d98e
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x47d98e
cmp eax, 0xffffffff
je 0x47d98e
call fcn.0047dd50
mov esi, eax
push 0x66d4f0
call fcn.004a73a0
add esp, 4
test eax, eax
jne 0x47d9ab
cmp dword [0x66d0a8], eax
je 0x47da8f
push edi
push 0x104
push 0
push 0x66d4f0
call fcn.004e69c0
mov edi, dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
lea eax, [ebp - 0x108]
add esp, 0xc
mov dword [0x66d0a8], 0
push 0x104
push eax
push 0x53e1f4
call edi
test eax, eax
jne 0x47da3d
push 0x104
lea eax, [ebp - 0x108]
push eax
push str.USERPROFILE
call edi
test eax, eax
jne 0x47da3d
push 0x104
lea eax, [ebp - 0x108]
push eax
push str.ProgramData
call edi
test eax, eax
jne 0x47da3d
push str._GetLastError_
push str.:5:GetPaulaInstallationDir___EAP:_GetEnvironmentVariable__ProgramData___FAILED:__s
call fcn.00424fd0
push 0x104
lea eax, [ebp - 0x108]
push str.C:ProgramData
push eax
call fcn.004a9a20
add esp, 0x14
lea edi, [ebp - 0x108]
dec edi
mov al, byte [edi + 1]
lea edi, [edi + 1]
test al, al
jne 0x47da44
mov ax, word [0x5182fc]
mov word [edi], ax
lea eax, [ebp - 0x108]
push eax
push str._sBETTY_
push 0x104
push 0x66d4f0
call fcn.004a94b0
add esp, 0x10
mov ecx, 0x66d4f0
lea edx, [ecx + 1]
pop edi
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x47da80
sub ecx, edx
mov dword [0x66d1b4], ecx
push 0x104
push 0x66d4f0
push 0x66d5f8
call fcn.004a9a20
push dword [0x66d1b4]
push 0x66d4f0
push 0x66d700
call fcn.004a9a20
add esp, 0x18
test esi, esi
jne 0x47db00
mov eax, dword [ebp + 0xc]
cmp eax, 0xffffffff
jne 0x47dadb
mov eax, 0x66d700
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004e50dc
mov esp, ebp
pop ebp
ret
test eax, eax
je 0x47daec
push str.:8:GetPaulaInstallationDir___was_called_with_an_INVALID_pszAppend___
call fcn.00424a90
add esp, 4
mov eax, 0x66d5f8
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004e50dc
mov esp, ebp
pop ebp
ret
cmp dword [ebp + 0xc], 0xffffffff
mov edx, esi
jne 0x47db2e
mov ecx, 0x66d700
sub edx, ecx
nop
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [edx + ecx - 1], al
test al, al
jne 0x47db10
mov eax, esi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004e50dc
mov esp, ebp
pop ebp
ret
mov ecx, 0x66d5f8
sub edx, ecx
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [edx + ecx - 1], al
test al, al
jne 0x47db35
mov ecx, 0x66d5f8
lea edx, [ecx + 1]
nop word [eax + eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x47db50
mov eax, dword [ebp + 0xc]
sub ecx, edx
test eax, eax
je 0x47dbac
lea edx, [ebp + 0x10]
push edx
push 0
push eax
mov eax, 0x104
sub eax, ecx
push eax
lea eax, [esi + ecx]
push eax
call fcn.004041c0
mov ecx, dword [eax]
push dword [eax + 4]
or ecx, 1
push ecx
call fcn.004eea53
or ecx, 0xffffffff
add esp, 0x1c
test eax, eax
cmovs eax, ecx
test eax, eax
jns 0x47dbac
push dword [ebp + 0xc]
push str.:8:GetPaulaInstallationDir___EAP:_MAX_PATH_has_been_exceeded:___s_
call fcn.00424a90
add esp, 8
mov byte [esi + 0x103], 0
mov ecx, dword [ebp - 4]
mov eax, esi
xor ecx, ebp
pop esi
call fcn.004e50dc
mov esp, ebp
pop ebp
ret