Function at 0x401a00
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x40e9dc
mov eax, dword fs:[0]
push eax
sub esp, 0x4b4
mov eax, dword [0x417170]
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
mov esi, ecx
mov dword [ebp - 0x4bc], esi
push 0x1000
call dword [sym.imp.USER32.dll_GetSystemMetrics]
test eax, eax
setne bl
call dword [sym.imp.KERNEL32.dll_WTSGetActiveConsoleSessionId]
xor ecx, ecx
cmp dword [esi + 0x6408], eax
movzx eax, bl
sete cl
push eax
push ecx
push str.UpdateContext_____Is_local_console:__d____Is_remote_desktop:__d_n
mov dword [esi + 0x6400], ecx
call fcn.00403b93
mov eax, dword [section..data]
add esp, 0xc
mov ecx, section..data
call dword [eax + 0xc]
lea edi, [eax + 0x10]
mov dword [ebp - 0x4c0], edi
mov dword [ebp - 4], 0
mov eax, dword [section..data]
mov ecx, section..data
call dword [eax + 0xc]
lea esi, [eax + 0x10]
mov dword [ebp - 0x4b8], esi
lea eax, [ebp - 0x4b0]
push eax
mov byte [ebp - 4], 1
mov eax, dword [0x419728]
or eax, 0x20019
push eax
xor ebx, ebx
push ebx
push str.SOFTWAREMicrosoftWindows_NTCurrentVersionWinLogon
push 0x80000002
mov dword [ebp - 0x4b0], ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov eax, dword [ebp - 0x4b0]
test eax, eax
je 0x401c7a
lea ecx, [ebp - 0x488]
push ecx
lea ecx, [ebp - 0x484]
push ecx
lea ecx, [ebp - 0x48c]
push ecx
push ebx
push str.UserLockSendGateway
push eax
mov dword [ebp - 0x48c], ebx
mov dword [ebp - 0x484], ebx
mov dword [ebp - 0x488], 4
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x401b29
cmp dword [ebp - 0x48c], 4
cmove ebx, dword [ebp - 0x484]
push dword [ebp - 0x4b0]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test ebx, ebx
je 0x401c7a
push str.UpdateContext_____Check_for_Citrix_NETSCALER_gateway__UserLockSendGateway___0_
call fcn.00403b93
mov ebx, dword [ebp - 0x4bc]
lea eax, [ebp - 0x480]
push dword [ebx + 0x6408]
push str.SOFTWARECitrixIcaSession_dConnection
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x10
lea eax, [ebp - 0x4b0]
push eax
mov eax, dword [0x419728]
or eax, 0x20019
push eax
push 0
lea eax, [ebp - 0x480]
push eax
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
cmp dword [ebp - 0x4b0], 0
je 0x401c6b
xor eax, eax
push 0x1fe
push eax
mov word [ebp - 0x280], ax
lea eax, [ebp - 0x27e]
push eax
call fcn.00404350
add esp, 0xc
lea eax, [ebp - 0x488]
push eax
lea eax, [ebp - 0x280]
push eax
lea eax, [ebp - 0x484]
push eax
push 0
push str.ConnectedViaIpAddress
push dword [ebp - 0x4b0]
mov dword [ebp - 0x484], 0
mov dword [ebp - 0x488], 0x200
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x401c4f
cmp dword [ebp - 0x484], 1
jne 0x401c4f
lea eax, [ebp - 0x280]
push eax
lea ecx, [ebp - 0x4b8]
call fcn.004023b0
lea eax, [ebp - 0x280]
push eax
lea ecx, [ebp - 0x4c0]
call fcn.004023b0
mov esi, dword [ebp - 0x4b8]
mov edi, dword [ebp - 0x4c0]
push esi
push edi
push str._UpdateContext______ConnectedViaIpAddress_address:___s_____s___n
call fcn.00403b93
add esp, 0xc
push dword [ebp - 0x4b0]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x401c80
push eax
push str.Unable_to_get_ConnectedViaIpAddress__x_n
call fcn.00403b93
add esp, 8
push dword [ebp - 0x4b0]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x401c80
push str.Unable_to_open_CitrixIca_session_key_n
call fcn.00403b93
add esp, 4
jmp 0x401c80
mov ebx, dword [ebp - 0x4bc]
cmp dword [esi - 0xc], 0
jne 0x401fef
mov ecx, dword [ebx + 0x6408]
mov dword [ebp - 0x4b0], 0
mov dword [ebp - 0x48c], 0
call fcn.00401900
lea ecx, [ebp - 0x48c]
push ecx
lea ecx, [ebp - 0x4b0]
push ecx
push 0xa
push dword [ebx + 0x6408]
mov cl, al
mov byte [ebp - 0x4b1], al
call fcn.00401740
mov edx, dword [ebp - 0x4b0]
test edx, edx
je 0x401d23
cmp word [edx], 0
je 0x401d09
mov ecx, edx
lea edi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x401ce1
sub ecx, edi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x4c0]
call fcn.004028f0
mov edi, dword [ebp - 0x4c0]
mov edx, dword [ebp - 0x4b0]
mov cl, byte [ebp - 0x4b1]
call fcn.00401830
push esi
push edi
push str._UpdateContext______WTSQuerySessionInformationHybrid_name:___s_____s___n
call fcn.00403b93
add esp, 0xc
mov eax, dword [0x418ed0]
test eax, eax
je 0x401ea9
lea ecx, [ebp - 0x488]
push ecx
push 0x20
lea ecx, [ebp - 0x4ac]
push ecx
push 0x1d
push dword [ebx + 0x6408]
mov dword [ebp - 0x488], 0
push 0
call eax
test al, al
jne 0x401d73
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str._UpdateContext______WinStationQueryInformationW2_failed:__08X_n
call fcn.00403b93
add esp, 8
jmp 0x401ea9
mov ax, word [ebp - 0x4ac]
cmp ax, 2
jne 0x401dd8
xor eax, eax
mov word [ebp - 0x30], ax
mov dword [ebp - 0x16], eax
mov word [ebp - 0x12], ax
movzx eax, byte [ebp - 0x4a1]
push eax
movzx eax, byte [ebp - 0x4a2]
push eax
movzx eax, byte [ebp - 0x4a3]
push eax
movzx eax, byte [ebp - 0x4a4]
push eax
xorps xmm0, xmm0
lea eax, [ebp - 0x30]
push str._u._u._u._u_n
push eax
movq qword [ebp - 0x2e], xmm0
movq qword [ebp - 0x26], xmm0
movq qword [ebp - 0x1e], xmm0
call fcn.00402af0
add esp, 0x18
lea eax, [ebp - 0x30]
jmp 0x401e88
cmp ax, 0x17
jne 0x401e9a
xor eax, eax
push 0x4e
push eax
mov word [ebp - 0x80], ax
lea eax, [ebp - 0x7e]
push eax
call fcn.00404350
movzx eax, byte [ebp - 0x491]
push eax
movzx eax, byte [ebp - 0x492]
push eax
movzx eax, byte [ebp - 0x493]
push eax
movzx eax, byte [ebp - 0x494]
push eax
movzx eax, byte [ebp - 0x495]
push eax
movzx eax, byte [ebp - 0x496]
push eax
movzx eax, byte [ebp - 0x497]
push eax
movzx eax, byte [ebp - 0x498]
push eax
movzx eax, byte [ebp - 0x499]
push eax
movzx eax, byte [ebp - 0x49a]
push eax
movzx eax, byte [ebp - 0x49b]
push eax
movzx eax, byte [ebp - 0x49c]
push eax
movzx eax, byte [ebp - 0x49d]
push eax
movzx eax, byte [ebp - 0x49e]
push eax
movzx eax, byte [ebp - 0x49f]
push eax
movzx eax, byte [ebp - 0x4a0]
push eax
lea eax, [ebp - 0x80]
push str._02x_02x:_02x_02x:_02x_02x:_02x_02x:_02x_02x:_02x_02x:_02x_02x:_02x_02x_n
push eax
call fcn.00402b10
add esp, 0x54
lea eax, [ebp - 0x80]
push eax
lea ecx, [ebp - 0x4b8]
call fcn.004023b0
mov esi, dword [ebp - 0x4b8]
push esi
push edi
push str._UpdateContext______WinStationQueryInformationW2_address:___s_____s___n
call fcn.00403b93
add esp, 0xc
mov cl, byte [ebp - 0x4b1]
lea eax, [ebp - 0x48c]
push eax
lea eax, [ebp - 0x4b0]
push eax
push 0xe
push dword [ebx + 0x6408]
mov dword [ebp - 0x4b0], 0
mov dword [ebp - 0x48c], 0
call fcn.00401740
mov ebx, dword [ebp - 0x4b0]
test ebx, ebx
je 0x401fef
mov eax, dword [ebx]
cmp eax, 2
jne 0x401f3c
xor eax, eax
mov word [ebp - 0x30], ax
mov dword [ebp - 0x16], eax
mov word [ebp - 0x12], ax
movzx eax, byte [ebx + 9]
push eax
movzx eax, byte [ebx + 8]
push eax
movzx eax, byte [ebx + 7]
push eax
movzx eax, byte [ebx + 6]
push eax
xorps xmm0, xmm0
lea eax, [ebp - 0x30]
push str._u._u._u._u_n
push eax
movq qword [ebp - 0x2e], xmm0
movq qword [ebp - 0x26], xmm0
movq qword [ebp - 0x1e], xmm0
call fcn.00402af0
add esp, 0x18
lea eax, [ebp - 0x30]
jmp 0x401fbb
cmp eax, 0x17
jne 0x401fd3
xor eax, eax
push 0x4e
push eax
mov word [ebp - 0x80], ax
lea eax, [ebp - 0x7e]
push eax
call fcn.00404350
movzx eax, byte [ebx + 0x15]
push eax
movzx eax, byte [ebx + 0x14]
push eax
movzx eax, byte [ebx + 0x13]
push eax
movzx eax, byte [ebx + 0x12]
push eax
movzx eax, byte [ebx + 0x11]
push eax
movzx eax, byte [ebx + 0x10]
push eax
movzx eax, byte [ebx + 0xf]
push eax
movzx eax, byte [ebx + 0xe]
push eax
movzx eax, byte [ebx + 0xd]
push eax
movzx eax, byte [ebx + 0xc]
push eax
movzx eax, byte [ebx + 0xb]
push eax
movzx eax, byte [ebx + 0xa]
push eax
movzx eax, byte [ebx + 9]
push eax
movzx eax, byte [ebx + 8]
push eax
movzx eax, byte [ebx + 7]
push eax
movzx eax, byte [ebx + 6]
push eax
lea eax, [ebp - 0x80]
push str._02x_02x:_02x_02x:_02x_02x:_02x_02x:_02x_02x:_02x_02x:_02x_02x:_02x_02x_n
push eax
call fcn.00402b10
add esp, 0x54
lea eax, [ebp - 0x80]
push eax
lea ecx, [ebp - 0x4b8]
call fcn.004023b0
mov ebx, dword [ebp - 0x4b0]
mov esi, dword [ebp - 0x4b8]
mov cl, byte [ebp - 0x4b1]
mov edx, ebx
call fcn.00401830
push esi
push edi
push str._UpdateContext______WTSQuerySessionInformationHybrid_address:___s_____s___n
call fcn.00403b93
add esp, 0xc
cmp dword [edi - 0xc], 0
mov ecx, dword [sym.imp.KERNEL32.dll_lstrcmpiW]
mov ebx, dword [ebp - 0x4bc]
je 0x402015
lea eax, [ebx + 0x4200]
push eax
push edi
call ecx
test eax, eax
jne 0x402029
mov ecx, dword [sym.imp.KERNEL32.dll_lstrcmpiW]
cmp dword [esi - 0xc], 0
je 0x40206a
lea eax, [ebx + 0x4400]
push eax
push esi
call ecx
test eax, eax
je 0x40206a
push esi
lea eax, [ebx + 0x4400]
push edi
push eax
add ebx, 0x4200
push ebx
push str._UpdateContext______passage_de_la_machine_cliente___s_____s__
call fcn.00403b93
push edi
push 0x100
push ebx
call fcn.00403fab
mov ebx, dword [ebp - 0x4bc]
push esi
lea eax, [ebx + 0x4400]
push 0x800
push eax
call fcn.00403fab
add esp, 0x2c
cmp word [ebx + 0x4200], 0
lea eax, [ebx + 0x4200]
mov dword [ebp - 0x488], eax
je 0x402086
cmp dword [edi - 0xc], 0
jne 0x402099
push 0x418f28
push 0x100
push eax
call fcn.00403fab
add esp, 0xc
lea eax, [ebx + 0x4400]
push str._._._._
push eax
mov dword [ebp - 0x48c], eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
je 0x4020c9
cmp word [ebx + 0x4400], 0
je 0x4020c9
cmp dword [edi - 0xc], 0
jne 0x402158
cmp byte [0x418f24], 0
je 0x402202
mov eax, dword [section..data]
mov ecx, section..data
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x484], eax
mov byte [ebp - 4], 2
mov ecx, dword [ebp - 0x488]
lea edx, [ebp - 0x484]
call fcn.00401400
mov ebx, dword [ebp - 0x484]
cmp dword [ebx - 0xc], 0
je 0x402121
push ebx
push 0x800
push dword [ebp - 0x48c]
call fcn.00403fab
add esp, 0xc
push ebx
push 0x418f28
push str._UpdateContext______Local_host_IP_address:___s_____s___n
call fcn.00403b93
add ebx, 0xfffffff0
add esp, 0xc
mov byte [ebp - 4], 1
lea eax, [ebx + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x402152
mov ecx, dword [ebx]
push ebx
mov eax, dword [ecx]
call dword [eax + 4]
mov ebx, dword [ebp - 0x4bc]
add ebx, 0x5400
push str._._._._
push ebx
mov dword [ebp - 0x488], ebx
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
je 0x40217e
cmp word [ebx], 0
jne 0x402202
cmp byte [0x418f24], 0
je 0x402202
mov eax, dword [section..data]
mov ecx, section..data
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x484], eax
lea edx, [ebp - 0x484]
mov ecx, 0x418f28
mov byte [ebp - 4], 3
call fcn.00401400
mov ebx, dword [ebp - 0x484]
cmp dword [ebx - 0xc], 0
je 0x4021d1
push ebx
push 0x800
push dword [ebp - 0x488]
call fcn.00403fab
add esp, 0xc
push ebx
push 0x418f28
push str._UpdateContext______Local_host_IP_address:___s_____s___n
call fcn.00403b93
add ebx, 0xfffffff0
add esp, 0xc
mov byte [ebp - 4], 1
lea eax, [ebx + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x402202
mov ecx, dword [ebx]
push ebx
mov eax, dword [ecx]
call dword [eax + 4]
lea edx, [esi - 0x10]
or esi, 0xffffffff
mov byte [ebp - 4], 0
lea eax, [edx + 0xc]
mov ecx, esi
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x402222
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
add edi, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea eax, [edi + 0xc]
lock xadd dword [eax], esi
dec esi
test esi, esi
jg 0x402240
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
xor eax, eax
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.004039d1
mov esp, ebp
pop ebp
ret