Function at 0x101d5150
Capabilities:
Get session user name

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x54
mov ebx, dword [ebp + 8]
mov dword [ebp - 0x20], 0
lea edi, [ebp - 0x20]
push edi
push 0
call sub.advapi32.dll_GetUserNameW
mov dword [ebp - 0x44], eax
call sub.KERNEL32.dll_GetLastError
lea ecx, [ebp - 0x44]
lea edx, [ebp - 0x34]
mov dword [ebp - 0x5c], 0x104435a8
mov dword [ebp - 0x58], 2
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x4c], 0
mov dword [ebp - 0x30], ecx
lea ecx, [ebp - 0x30]
mov dword [ebp - 0x2c], 0x101a29c0
mov dword [ebp - 0x28], edx
mov dword [ebp - 0x24], 0x101a2bc0
mov dword [ebp - 0x54], ecx
mov dword [ebp - 0x50], 2
lea esi, [ebp - 0x5c]
push esi
call fcn.100748a0
add esp, 4
cmp dword [ebp - 0x44], 0
je 0x101d51e0
mov dword [ebx], 1
mov dword [ebx + 4], 0
mov dword [ebx + 8], 0
jmp 0x101d54e2
mov ecx, dword [ebp - 0x20]
test ecx, ecx
mov dword [ebp - 0x18], ecx
je 0x101d524a
xor ebx, ebx
cmp ecx, 0x40000000
setb al
jae 0x101d5503
mov bl, al
add ecx, ecx
add ebx, ebx
test ecx, ecx
mov dword [ebp - 0x14], ecx
js 0x101d550a
je 0x101d5251
mov eax, dword [0x1044f00c]
movzx eax, byte [eax]
mov eax, dword [0x1044eff8]
mov eax, dword [eax]
test eax, eax
jne 0x101d5236
call sub.KERNEL32.dll_GetProcessHeap
test eax, eax
je 0x101d54f5
mov ecx, dword [0x1044eff8]
mov dword [ecx], eax
push dword [ebp - 0x14]
push 0
push eax
call sub.KERNEL32.dll_HeapAlloc
test eax, eax
jne 0x101d525b
jmp 0x101d54f5
mov eax, 2
jmp 0x101d525b
mov eax, ebx
test eax, eax
je 0x101d54f5
push edi
push eax
mov edi, eax
call sub.advapi32.dll_GetUserNameW
mov ebx, dword [ebp + 8]
test eax, eax
mov dword [ebp - 0x60], eax
je 0x101d533f
push dword [ebp - 0x20]
push edi
push esi
call fcn.1001bab0
add esp, 0xc
cmp dword [ebp - 0x5c], 0
je 0x101d5511
movsd xmm0, qword [ebp - 0x5c]
mov ecx, dword [ebp - 0x54]
xor ebx, ebx
mov dword [ebp - 0x3c], edi
movsd qword [ebp - 0x30], xmm0
mov dword [ebp - 0x28], ecx
mov eax, dword [ebp - 0x30]
mov dword [ebp - 0x14], eax
jmp 0x101d52e0
movzx edx, byte [ebx]
and esi, 7
shl edi, 6
shl esi, 0x12
and edx, 0x3f
or edx, edi
or edx, esi
cmp edx, 0x110000
je 0x101d54ec
nop word cs:[eax + eax]
nop
inc ebx
sub ebx, dword [ebp - 0x14]
test edx, edx
mov edx, eax
mov eax, ebx
jne 0x101d53bb
cmp ebx, ecx
je 0x101d53b5
mov edx, dword [ebp - 0x14]
mov eax, ebx
add ebx, edx
movzx edx, byte [ebx]
test dl, dl
jns 0x101d52d0
movzx edi, byte [ebx + 1]
mov esi, edx
add ebx, 2
and esi, 0x1f
and edi, 0x3f
cmp dl, 0xdf
jbe 0x101d5336
mov dword [ebp - 0x1c], edi
movzx edi, byte [ebx]
inc ebx
mov dword [ebp - 0x10], edi
mov edi, dword [ebp - 0x1c]
and dword [ebp - 0x10], 0x3f
shl edi, 6
add dword [ebp - 0x10], edi
cmp dl, 0xf0
mov edi, dword [ebp - 0x10]
jae 0x101d52a6
shl esi, 0xc
or edi, esi
mov edx, edi
jmp 0x101d52d1
shl esi, 6
or esi, edi
mov edx, esi
jmp 0x101d52d1
call sub.KERNEL32.dll_GetLastError
lea ecx, [ebp - 0x60]
lea edx, [ebp - 0x34]
mov dword [ebp - 0x5c], 0x104435a8
mov dword [ebp - 0x58], 2
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x4c], 0
mov dword [ebp - 0x30], ecx
lea ecx, [ebp - 0x30]
mov dword [ebp - 0x2c], 0x101a29c0
mov dword [ebp - 0x28], edx
mov dword [ebp - 0x24], 0x101a2bc0
mov dword [ebp - 0x54], ecx
mov dword [ebp - 0x50], 2
push esi
call fcn.100748a0
add esp, 4
cmp dword [ebp - 0x18], 0
mov dword [ebx], 1
mov dword [ebx + 4], 0
mov dword [ebx + 8], 0
je 0x101d54e2
mov eax, dword [0x1044eff8]
push edi
jmp 0x101d54d9
xor edx, edx
mov ebx, ecx
xor eax, eax
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x40], edx
jmp 0x101d53d8
dec ecx
sub ecx, dword [ebp - 0x14]
test eax, eax
jne 0x101d544a
cmp ebx, ecx
je 0x101d5447
mov eax, dword [ebp - 0x14]
mov edi, ecx
add ecx, eax
movzx eax, byte [ecx - 1]
test al, al
jns 0x101d53d0
movzx edx, byte [ecx - 2]
add ecx, 0xfffffffe
cmp dl, 0xc0
jge 0x101d5421
mov dword [ebp - 0x1c], edx
movzx edx, byte [ecx - 1]
dec ecx
cmp dl, 0xc0
mov dword [ebp - 0x10], edx
jge 0x101d5426
movzx esi, byte [ecx - 1]
dec ecx
and esi, 7
shl esi, 6
mov edx, esi
mov esi, dword [ebp - 0x10]
and esi, 0x3f
or esi, edx
mov dword [ebp - 0x10], esi
jmp 0x101d542a
and edx, 0x1f
jmp 0x101d5438
and dword [ebp - 0x10], 0xf
mov edx, dword [ebp - 0x1c]
mov esi, dword [ebp - 0x10]
shl esi, 6
and edx, 0x3f
or edx, esi
shl edx, 6
and eax, 0x3f
or eax, edx
cmp eax, 0x110000
jne 0x101d53d1
mov edi, dword [ebp - 0x38]
sub edi, dword [ebp - 0x40]
mov ebx, 1
je 0x101d5496
setns al
js 0x101d5540
mov byte [ebp - 0x10], al
mov eax, dword [0x1044f00c]
mov esi, dword [0x1044eff8]
movzx eax, byte [eax]
mov eax, dword [esi]
test eax, eax
jne 0x101d5483
call sub.KERNEL32.dll_GetProcessHeap
test eax, eax
je 0x101d5530
mov dword [esi], eax
push edi
push 0
push eax
call sub.KERNEL32.dll_HeapAlloc
mov ebx, eax
test eax, eax
je 0x101d5530
mov eax, dword [ebp - 0x40]
add eax, dword [ebp - 0x14]
push edi
push eax
push ebx
call sub.msvcrt.dll_memcpy
add esp, 0xc
mov eax, dword [ebp + 8]
cmp dword [ebp - 0x18], 0
mov dword [eax], ebx
mov ebx, eax
mov dword [eax + 4], edi
mov dword [eax + 8], edi
je 0x101d54cb
mov eax, dword [0x1044eff8]
push dword [ebp - 0x3c]
push 0
push dword [eax]
call sub.KERNEL32.dll_HeapFree
cmp dword [ebp - 0x2c], 0
je 0x101d54e2
mov eax, dword [0x1044eff8]
push dword [ebp - 0x14]
push 0
push dword [eax]
call sub.KERNEL32.dll_HeapFree
mov eax, ebx
add esp, 0x54
pop esi
pop edi
pop ebx
pop ebp
ret
mov ebx, eax
xor edx, edx
jmp 0x101d53b9
push dword [ebp - 0x14]
push ebx
call fcn.1001ac80
add esp, 8
ud2
call fcn.1001ac40
ud2
call fcn.1001ac40
ud2
push 0x104435d8
push 0x1043ecd0
lea eax, [ebp - 0x30]
push eax
push 0x2b
push str.called__Result::unwrap____on_an__Err__value
call fcn.10027650
add esp, 0x14
jmp 0x101d5545
movzx eax, byte [ebp - 0x10]
push edi
push eax
call fcn.1001ac80
add esp, 8
jmp 0x101d5545
call fcn.1001ac40
ud2