Function at 0x410760
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x64620b
mov eax, dword fs:[0]
push eax
sub esp, 0x4a0
mov eax, dword [0x6c3afc]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
xor edi, edi
mov ebx, ecx
mov eax, 0xf
mov dword [ebp - 0x4a0], ebx
mov dword [ebp - 0x4a8], edi
mov dword [ebp - 0x434], eax
mov dword [ebp - 0x438], edi
mov byte [ebp - 0x448], 0
xor ecx, ecx
mov dword [ebp - 4], edi
cmp ecx, str._tmp_
je 0x410aae
push 0x3ff
lea edx, [ebp - 0x40f]
push edi
push edx
mov byte [ebp - 0x410], cl
call fcn.005de050
add esp, 0xc
push 0xc
xor eax, eax
push str.Kernel32.dll
lea ecx, [ebp - 0x42c]
mov dword [ebp - 0x4a4], edi
mov dword [ebp - 0x418], 7
mov dword [ebp - 0x41c], edi
mov word [ebp - 0x42c], ax
call fcn.00403600
cmp dword [ebp - 0x41c], edi
jne 0x41081f
xor esi, esi
jmp 0x410868
mov eax, dword [ebp - 0x42c]
mov esi, 8
cmp dword [ebp - 0x418], esi
jae 0x410838
lea eax, [ebp - 0x42c]
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
cmp eax, edi
jne 0x410866
mov eax, dword [ebp - 0x42c]
cmp dword [ebp - 0x418], esi
jae 0x410857
lea eax, [ebp - 0x42c]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
cmp eax, edi
jne 0x410866
xor esi, esi
jmp 0x410868
mov esi, eax
cmp dword [ebp - 0x418], 8
jb 0x410880
mov ecx, dword [ebp - 0x42c]
push ecx
call fcn.004effaf
add esp, 4
xor edx, edx
mov dword [ebp - 0x418], 7
mov dword [ebp - 0x41c], edi
mov word [ebp - 0x42c], dx
cmp esi, edi
je 0x410a2c
push str.Wtsapi32.dll
lea ecx, [ebp - 0x464]
call fcn.004036f0
lea eax, [ebp - 0x464]
call fcn.00406620
cmp dword [ebp - 0x450], 8
mov edi, eax
jb 0x4108d6
mov eax, dword [ebp - 0x464]
push eax
call fcn.004effaf
add esp, 4
xor ecx, ecx
mov dword [ebp - 0x450], 7
mov dword [ebp - 0x454], 0
mov word [ebp - 0x464], cx
test edi, edi
je 0x410a2a
push str.Userenv.dll
lea ecx, [ebp - 0x49c]
call fcn.004036f0
lea eax, [ebp - 0x49c]
call fcn.00406620
lea ecx, [ebp - 0x49c]
mov dword [ebp - 0x4ac], eax
call fcn.004bf3b0
cmp dword [ebp - 0x4ac], 0
je 0x410a2a
push str.advapi32.dll
lea ecx, [ebp - 0x480]
call fcn.004036f0
lea eax, [ebp - 0x480]
call fcn.00406620
lea ecx, [ebp - 0x480]
mov dword [ebp - 0x4a8], eax
call fcn.004bf3b0
cmp dword [ebp - 0x4a8], 0
je 0x410a2a
push str.WTSGetActiveConsoleSessionId
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
call esi
mov ebx, eax
test ebx, ebx
je 0x410a24
push str.WTSQueryUserToken
push edi
call esi
mov edi, eax
test edi, edi
je 0x410a24
mov edx, dword [ebp - 0x4ac]
push str.ExpandEnvironmentStringsForUserA
push edx
call esi
mov esi, eax
test esi, esi
je 0x410a24
push str.SeTcbPrivilege
lea ecx, [ebp - 0x480]
call fcn.004036f0
lea ecx, [ebp - 0x480]
call fcn.00406500
lea ecx, [ebp - 0x480]
call fcn.004bf3b0
call ebx
lea ecx, [ebp - 0x4a4]
push ecx
push eax
call edi
test eax, eax
je 0x410a24
mov eax, dword [ebp - 0x4a4]
push 0x400
lea edx, [ebp - 0x410]
push edx
push str._tmp_
push eax
call esi
test eax, eax
je 0x410a24
lea eax, [ebp - 0x410]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x410a08
sub eax, edx
push eax
lea ecx, [ebp - 0x410]
push ecx
lea ecx, [ebp - 0x448]
call fcn.00403c90
mov ebx, dword [ebp - 0x4a0]
xor edi, edi
cmp dword [ebp - 0x438], edi
jne 0x410a74
push 0x400
lea edx, [ebp - 0x410]
push edx
push str._tmp_
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
test eax, eax
je 0x410a74
lea eax, [ebp - 0x410]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x410a58
sub eax, edx
push eax
lea eax, [ebp - 0x410]
push eax
lea ecx, [ebp - 0x448]
call fcn.00403c90
mov ecx, dword [ebp - 0x4a4]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea edx, [ebp - 0x448]
mov dword [ebx + 0x14], 0xf
mov dword [ebx + 0x10], edi
push edx
mov ecx, ebx
mov byte [ebx], 0
call fcn.00403740
cmp dword [ebp - 0x434], 0x10
jb 0x410adc
mov eax, dword [ebp - 0x448]
push eax
jmp 0x410ad4
mov dword [ebx + 0x14], eax
mov dword [ebx + 0x10], edi
mov byte [ebx], cl
lea ecx, [ebp - 0x448]
push ecx
mov ecx, ebx
call fcn.00403740
cmp dword [ebp - 0x434], 0x10
jb 0x410adc
mov edx, dword [ebp - 0x448]
push edx
call fcn.004effaf
add esp, 4
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.005dd8e2
mov esp, ebp
pop ebp
ret