Function at 0x40e840
Capabilities:
Get session user name
Get user security identifier

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x440bb1
mov eax, dword fs:[0]
push eax
sub esp, 0x270
mov eax, dword [0x453044]
xor eax, ebp
mov dword [ebp - 0x10], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x25c], ecx
mov dword [ebp - 0x224], 0
mov dword [ebp - 0x228], 0
mov dword [ebp - 0x240], 0x1000
mov dword [ebp - 0x250], str.UserSID
lea ecx, [ebp - 0x21c]
call fcn.004021b0
mov dword [ebp - 4], 0
mov dword [ebp - 0x258], 0x80000001
mov dword [ebp - 0x254], inet_addr
mov dword [ebp - 0x230], 0
jmp 0x40e8da
mov eax, dword [ebp - 0x230]
add eax, 1
mov dword [ebp - 0x230], eax
cmp dword [ebp - 0x230], 2
je 0x40ea08
push 0
lea ecx, [ebp - 0x27c]
call fcn.00409350
mov byte [ebp - 4], 1
push 0x20119
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp - 0x230]
mov eax, dword [ebp + edx*4 - 0x258]
push eax
lea ecx, [ebp - 0x27c]
call fcn.00409100
test eax, eax
jne 0x40e97d
lea ecx, [ebp - 0x240]
push ecx
mov edx, dword [ebp - 0x240]
push edx
lea ecx, [ebp - 0x21c]
call fcn.00402a80
push eax
mov eax, dword [ebp - 0x250]
push eax
lea ecx, [ebp - 0x27c]
call fcn.0040e640
test eax, eax
jne 0x40e95a
mov dword [ebp - 0x244], 1
jmp 0x40e964
mov dword [ebp - 0x244], 0
mov ecx, dword [ebp - 0x244]
mov dword [ebp - 0x228], ecx
push 0xffffffffffffffff
lea ecx, [ebp - 0x21c]
call fcn.00405740
cmp dword [ebp - 0x228], 0
je 0x40e9df
lea ecx, [ebp - 0x21c]
call fcn.00402750
movzx edx, al
test edx, edx
jne 0x40e9df
lea eax, [ebp - 0x21c]
push eax
mov ecx, dword [ebp + 8]
call fcn.004013a0
mov ecx, dword [ebp - 0x224]
or ecx, 1
mov dword [ebp - 0x224], ecx
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x27c]
call fcn.004093d0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x21c]
call fcn.004020b0
mov eax, dword [ebp + 8]
jmp 0x40ed0a
mov dword [ebp - 0x228], 0
lea ecx, [ebp - 0x21c]
call fcn.004027b0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x27c]
call fcn.004093d0
jmp 0x40e8cb
mov dword [ebp - 0x248], 0
push str.explorer.exe
lea edx, [ebp - 0x248]
push edx
mov ecx, dword [ebp - 0x25c]
call fcn.0040e700
test eax, eax
jne 0x40ea32
jmp 0x40ebc4
mov eax, dword [ebp - 0x248]
push eax
call dword [sym.imp.ADVAPI32.dll_ImpersonateLoggedOnUser]
test eax, eax
jne 0x40ea48
jmp 0x40ebc4
mov dword [ebp - 0x260], 0x104
lea ecx, [ebp - 0x260]
push ecx
lea edx, [ebp - 0x218]
push edx
call dword [sym.imp.ADVAPI32.dll_GetUserNameW]
test eax, eax
jne 0x40ea6f
jmp 0x40ebc4
call dword [sym.imp.ADVAPI32.dll_RevertToSelf]
test eax, eax
jne 0x40ea7e
jmp 0x40ebc4
mov dword [ebp - 0x220], 0
mov dword [ebp - 0x23c], 0
mov dword [ebp - 0x238], 0
lea ecx, [ebp - 0x234]
call fcn.004021b0
mov byte [ebp - 4], 2
lea eax, [ebp - 0x264]
push eax
lea ecx, [ebp - 0x238]
push ecx
push 0
lea edx, [ebp - 0x23c]
push edx
push 0
lea eax, [ebp - 0x218]
push eax
push 0
call dword [sym.imp.ADVAPI32.dll_LookupAccountNameW]
mov ecx, dword [ebp - 0x23c]
push ecx
call fcn.0041ebae
add esp, 4
mov dword [ebp - 0x220], eax
cmp dword [ebp - 0x220], 0
jne 0x40eb05
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x234]
call fcn.004020b0
jmp 0x40ebc4
lea edx, [ebp - 0x264]
push edx
lea eax, [ebp - 0x238]
push eax
mov ecx, dword [ebp - 0x238]
shl ecx, 1
push ecx
lea ecx, [ebp - 0x234]
call fcn.00402a80
push eax
lea edx, [ebp - 0x23c]
push edx
mov eax, dword [ebp - 0x220]
push eax
lea ecx, [ebp - 0x218]
push ecx
push 0
call dword [sym.imp.ADVAPI32.dll_LookupAccountNameW]
mov dword [ebp - 0x228], eax
push 0xffffffffffffffff
lea ecx, [ebp - 0x234]
call fcn.00405740
cmp dword [ebp - 0x228], 0
je 0x40eb94
lea edx, [ebp - 0x24c]
push edx
mov eax, dword [ebp - 0x220]
push eax
call dword [sym.imp.ADVAPI32.dll_ConvertSidToStringSidW]
mov ecx, dword [ebp - 0x24c]
push ecx
lea ecx, [ebp - 0x21c]
call fcn.004026b0
mov edx, dword [ebp - 0x24c]
push edx
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [ebp - 0x220]
push eax
call fcn.0041ebb9
add esp, 4
mov dword [ebp - 0x220], 0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x234]
call fcn.004020b0
xor ecx, ecx
jne 0x40ea08
lea ecx, [ebp - 0x21c]
call fcn.00402750
movzx edx, al
test edx, edx
je 0x40ec0e
lea eax, [ebp - 0x21c]
push eax
mov ecx, dword [ebp + 8]
call fcn.004013a0
mov ecx, dword [ebp - 0x224]
or ecx, 1
mov dword [ebp - 0x224], ecx
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x21c]
call fcn.004020b0
mov eax, dword [ebp + 8]
jmp 0x40ed0a
mov dword [ebp - 0x22c], 0
jmp 0x40ec29
mov edx, dword [ebp - 0x22c]
add edx, 1
mov dword [ebp - 0x22c], edx
cmp dword [ebp - 0x22c], 2
je 0x40ecd7
push 0
lea ecx, [ebp - 0x270]
call fcn.00409350
push 0xf013f
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp - 0x22c]
mov edx, dword [ebp + ecx*4 - 0x258]
push edx
lea ecx, [ebp - 0x270]
call fcn.00409100
test eax, eax
je 0x40eca7
push 0
push 0
push 0xf013f
push 0
push 0
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp - 0x22c]
mov edx, dword [ebp + ecx*4 - 0x258]
push edx
lea ecx, [ebp - 0x270]
call fcn.00408390
test eax, eax
je 0x40eca7
lea ecx, [ebp - 0x270]
call fcn.004093d0
jmp 0x40ec1a
push 1
lea ecx, [ebp - 0x21c]
call fcn.004017b0
push eax
mov eax, dword [ebp - 0x250]
push eax
lea ecx, [ebp - 0x270]
call fcn.00408500
lea ecx, [ebp - 0x270]
call fcn.004093d0
jmp 0x40ec1a
lea ecx, [ebp - 0x21c]
push ecx
mov ecx, dword [ebp + 8]
call fcn.004013a0
mov edx, dword [ebp - 0x224]
or edx, 1
mov dword [ebp - 0x224], edx
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x21c]
call fcn.004020b0
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0041aaa9
mov esp, ebp
pop ebp
ret 8