Function at 0x10009a40
Capabilities:
Get session user name
Get user security identifier
Query environment variable
Read .ini file

Disassembly:
sub esp, 0x550
mov ecx, dword [esp + 0x558]
push ebx
mov ebx, dword [esp + 0x558]
push ebp
push esi
mov edx, ecx
push edi
xor eax, eax
mov edi, ebx
mov esi, 0x80
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
mov dword [esp + 0x18], esi
and ecx, 3
rep stosb byte es:[edi], al
lea eax, [esp + 0x18]
lea ecx, [esp + 0x60]
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_GetUserNameA]
lea edx, [esp + 0x38]
mov edi, dword [sym.imp.ADVAPI32.dll_LookupAccountNameA]
lea eax, [esp + 0x30]
push edx
lea ecx, [esp + 0xe4]
push eax
lea edx, [esp + 0x20]
push ecx
push edx
lea eax, [esp + 0x70]
push 0
push eax
push 0
mov dword [esp + 0x34], 0
mov dword [esp + 0x4c], esi
call edi
mov eax, dword [esp + 0x18]
test eax, eax
jne 0x10009aca
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x550
ret
mov ebp, dword [sym.imp.MSVCRT.dll_malloc]
push eax
call ebp
add esp, 4
lea ecx, [esp + 0x38]
mov esi, eax
lea edx, [esp + 0x30]
push ecx
lea eax, [esp + 0xe4]
push edx
lea ecx, [esp + 0x20]
push eax
push ecx
lea edx, [esp + 0x70]
push esi
push edx
push 0
call edi
lea eax, [esp + 0x3c]
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_ConvertSidToStringSidW]
mov ecx, 6
xor eax, eax
lea edi, [esp + 0x48]
lea edx, [esp + 0x48]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x28]
mov dword [esp + 0x48], 0x18
push ecx
push 0x800
push edx
push eax
call sub.ADVAPI32.dll_LsaOpenPolicy
push 8
call ebp
mov dword [esp + 0x14], eax
mov word [eax], 0x500
mov eax, dword [esp + 0x14]
push 0x500
mov word [eax + 2], 0x500
call ebp
mov ecx, dword [esp + 0x18]
push 0x200
mov dword [ecx + 4], eax
mov word [esp + 0x2a], 0x200
call ebp
mov edi, dword [sym.imp.MSVCRT.dll_wcscpy]
push str.RasDialParams_
push eax
mov dword [esp + 0x34], eax
call edi
mov edx, dword [esp + 0x50]
mov eax, dword [esp + 0x34]
mov esi, dword [sym.imp.MSVCRT.dll_wcscat]
push edx
push eax
call esi
mov ecx, dword [esp + 0x3c]
push 0x10030b4c
push ecx
call esi
mov edx, dword [esp + 0x44]
push edx
call dword [sym.imp.MSVCRT.dll_wcslen]
mov edx, dword [esp + 0x50]
add esp, 0x28
shl eax, 1
mov word [esp + 0x1c], ax
lea eax, [esp + 0x10]
lea ecx, [esp + 0x1c]
push eax
push ecx
push edx
call sub.ADVAPI32.dll_LsaRetrievePrivateData
mov esi, eax
test esi, esi
je 0x10009bf8
mov eax, dword [esp + 0x20]
push str.L__RasDefaultCredentials0
push eax
call edi
mov ecx, dword [esp + 0x28]
push ecx
call dword [sym.imp.MSVCRT.dll_wcslen]
mov ecx, dword [esp + 0x34]
add esp, 0xc
shl eax, 1
mov word [esp + 0x1c], ax
lea edx, [esp + 0x10]
lea eax, [esp + 0x1c]
push edx
push eax
push ecx
call sub.ADVAPI32.dll_LsaRetrievePrivateData
mov esi, eax
mov edx, dword [esp + 0x28]
push edx
call sub.ADVAPI32.dll_LsaClose
test esi, esi
je 0x10009c13
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x550
ret
mov eax, dword [esp + 0x10]
push 0
xor ecx, ecx
push 0
mov cx, word [eax]
mov edx, dword [eax + 4]
push 0x500
push 0x100428c0
push ecx
push edx
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test eax, eax
jne 0x10009c48
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x550
ret
mov esi, dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
mov dword [0x100428bc], eax
lea eax, [esp + 0x160]
push 0x138
push eax
push str.ALLUSERSPROFILE
call esi
lea ecx, [esp + 0x360]
push 0x138
push ecx
push str.USERPROFILE
call esi
mov edi, str.Application_DataMicrosoftNetworkConnectionspbk_rasphone.pbk
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x160]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 0x214
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea edx, [esp + 0x364]
and ecx, 3
push 0x40
rep movsb byte es:[edi], byte [esi]
mov edi, str.Application_DataMicrosoftNetworkConnectionspbk_rasphone.pbk
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [sym.imp.KERNEL32.dll_GlobalAlloc]
call edi
mov esi, eax
lea eax, [esp + 0x2c]
lea ecx, [esp + 0x24]
push eax
push ecx
push esi
push 0
mov dword [esi], 0x214
push 0
mov dword [esp + 0x38], 0x214
call sub.RASAPI32.dll_RasEnumEntriesA
cmp eax, 0x25b
jne 0x10009d26
mov edx, dword [esp + 0x24]
push edx
push 0x40
call edi
mov esi, eax
mov dword [esi], 0x214
lea eax, [esp + 0x2c]
lea ecx, [esp + 0x24]
push eax
push ecx
push esi
push 0
push 0
call sub.RASAPI32.dll_RasEnumEntriesA
test eax, eax
je 0x10009d4b
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x550
ret
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x34], 0
test eax, eax
jbe 0x1000a005
add esi, 4
mov dword [esp + 0x14], esi
jmp 0x10009d6e
mov ebp, dword [sym.imp.MSVCRT.dll_malloc]
push 0x424
call ebp
mov edi, dword [esp + 0x18]
mov ebp, eax
or ecx, 0xffffffff
xor eax, eax
add esp, 4
lea edx, [ebp + 4]
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
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x44]
mov dword [ebp], 0x424
push ecx
push ebp
push 0
call sub.RASAPI32.dll_RasGetEntryDialParamsA
mov esi, dword [esp + 0x14]
mov edi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
lea edx, [esp + 0x160]
push edx
push 0
push str.DialParamsUID
push esi
call edi
test eax, eax
jne 0x10009e37
lea eax, [esp + 0x160]
push eax
push 0
push str.DialParamsUID
push esi
call fcn.10009980
add esp, 0x10
test eax, eax
jne 0x10009e37
lea ecx, [esp + 0x360]
push ecx
push eax
push str.DialParamsUID
push esi
call edi
test eax, eax
jne 0x10009e37
lea edx, [esp + 0x360]
push edx
push eax
push str.DialParamsUID
push esi
call fcn.10009980
add esp, 0x10
test eax, eax
jne 0x10009e37
push ebp
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
add esi, 0x214
mov dword [esp + 0x14], esi
jmp 0x10009ff0
lea ecx, [ebp + 0x207]
push eax
push ecx
call fcn.10009810
mov dword [esp + 0x48], eax
mov edi, ebx
or ecx, 0xffffffff
xor eax, eax
add esp, 8
repne scasb al, byte es:[edi]
mov eax, dword [esp + 0x568]
not ecx
dec ecx
sub eax, ecx
cmp eax, 0x2bc
jb 0x1000a005
or ecx, 0xffffffff
mov edi, 0x10030a9c
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edx, ecx
or ecx, 0xffffffff
mov edi, ebx
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
or ecx, 0xffffffff
lea edi, [ebp + 4]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
or ecx, 0xffffffff
mov edi, ebx
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
or ecx, 0xffffffff
mov edi, 0x100304a0
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edx, ecx
mov edi, ebx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x10030a94
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edx, ecx
mov edi, ebx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [ebp + 0x207]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edx, ecx
mov edi, ebx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
dec edi
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x100304a0
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edx, ecx
mov edi, ebx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x10030a8c
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edx, ecx
mov edi, ebx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [esp + 0x40]
test edi, edi
je 0x10009faf
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edx, ecx
mov edi, ebx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x10030470
or ecx, 0xffffffff
xor eax, eax
push ebp
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edx, ecx
mov edi, ebx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.MSVCRT.dll_free]
mov eax, dword [esp + 0x18]
add esp, 4
add eax, 0x214
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x34]
mov ecx, dword [esp + 0x2c]
inc eax
cmp eax, ecx
mov dword [esp + 0x34], eax
jb 0x10009d68
mov edi, ebx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
pop edi
dec ecx
pop esi
pop ebp
mov eax, ecx
pop ebx
add esp, 0x550
ret