Function at 0x10183c10
Capabilities:
Get session user name
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x230
mov eax, dword [0x10254be4]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, 0x3d
mov word [ebp - 0x210], ax
push 0x104
lea ecx, [ebp - 0x20e]
push ecx
push 0x10253c04
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
jne 0x10183d85
mov dword [ebp - 0x224], 0
push 0x104
lea edx, [ebp - 0x20e]
push edx
push 0x10253c10
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
je 0x10183c88
lea eax, [ebp - 0x20e]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov dword [ebp - 0x220], eax
jmp 0x10183c92
mov dword [ebp - 0x220], 0
mov ecx, 0x104
sub ecx, dword [ebp - 0x220]
push ecx
mov edx, dword [ebp - 0x220]
lea eax, [ebp + edx*2 - 0x20e]
push eax
push 0x10253c24
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
jne 0x10183cc4
cmp dword [ebp - 0x220], 0
je 0x10183cd0
mov dword [ebp - 0x224], 1
jmp 0x10183d37
push 0x104
lea ecx, [ebp - 0x20e]
push ecx
push 0x10253c38
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
je 0x10183cf7
mov dword [ebp - 0x224], 1
jmp 0x10183d37
lea edx, [ebp - 0x20e]
push edx
push 0x28
call fcn.10183980
add esp, 8
test eax, eax
je 0x10183d18
mov dword [ebp - 0x224], 1
jmp 0x10183d37
lea eax, [ebp - 0x20e]
push eax
push 5
call fcn.10183980
add esp, 8
test eax, eax
je 0x10183d37
mov dword [ebp - 0x224], 1
cmp dword [ebp - 0x224], 0
je 0x10183d85
lea ecx, [ebp - 0x20e]
push ecx
call fcn.101839f0
add esp, 4
lea edx, [ebp - 0x218]
mov dword [ebp - 0x228], edx
push 8
push 0x10253c50
mov eax, dword [ebp - 0x228]
push eax
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
mov ecx, dword [ebp - 0x228]
push ecx
call dword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll__wputenv]
add esp, 4
xor edx, edx
jne 0x10183d4f
push 0x104
lea eax, [ebp - 0x20e]
push eax
push 0x10253c5c
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
jne 0x10183e26
push 0x104
lea ecx, [ebp - 0x20e]
push ecx
push str.USERNAME
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
jne 0x10183df0
mov dword [ebp - 0x220], 0x104
lea edx, [ebp - 0x220]
push edx
lea eax, [ebp - 0x20e]
push eax
call dword [sym.imp.ADVAPI32.dll_GetUserNameW]
test eax, eax
jne 0x10183df0
mov dword [0x1026cda0], str._Unknown_
jmp 0x10183ee5
lea ecx, [ebp - 0x218]
mov dword [ebp - 0x22c], ecx
push 8
push 0x10253c88
mov edx, dword [ebp - 0x22c]
push edx
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
mov eax, dword [ebp - 0x22c]
push eax
call dword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll__wputenv]
add esp, 4
xor ecx, ecx
jne 0x10183df0
push str.USER
call sym.ruby.dll_rb_w32_getenv
add esp, 4
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__strdup]
add esp, 4
mov dword [0x1026cda0], eax
push 0x104
lea edx, [ebp - 0x20e]
push edx
push str.TMPDIR
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
jne 0x10183ee5
push 0x104
lea eax, [ebp - 0x20e]
push eax
push 0x10253c9c
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
jne 0x10183ee5
push 0x104
lea ecx, [ebp - 0x20e]
push ecx
push str.TEMP
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
jne 0x10183ee5
push 0x104
lea edx, [ebp - 0x20e]
push edx
call sym.ruby.dll_rb_w32_system_tmpdir
add esp, 8
test eax, eax
je 0x10183ee5
lea eax, [ebp - 0x21c]
mov dword [ebp - 0x230], eax
push 0xc
push str.TMPDIR
mov ecx, dword [ebp - 0x230]
push ecx
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
mov edx, dword [ebp - 0x230]
push edx
call dword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll__wputenv]
add esp, 4
xor eax, eax
jne 0x10183eaf
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.101949b1
mov esp, ebp
pop ebp
ret