Function at 0x845c5f0
Capabilities:
Get hostname
Get user security identifier

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x84f9168
mov eax, dword fs:[0]
push eax
sub esp, 0x20
mov eax, dword [0x184002c0]
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 eax, dword [ebp + 8]
mov ecx, eax
mov dword [ebp - 0x2c], eax
call fcn.0840e1d0
mov dword [ebp - 0x14], 0x10
call fcn.0840e590
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x845c64b
push 0x80004005
call fcn.0840d910
mov eax, dword [edx]
mov ecx, edx
call dword [eax + 0xc]
lea esi, [eax + 0x10]
mov dword [ebp - 0x28], esi
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, 0x10
or eax, ecx
mov dword [ebp - 4], 0
jge 0x845c67e
push 0x10
lea ecx, [ebp - 0x28]
call fcn.0840e870
mov esi, dword [ebp - 0x28]
cmp dword [esi - 8], 0x10
jge 0x845c68e
push 0x80070057
call fcn.0840d910
xor eax, eax
mov dword [esi - 0xc], 0x10
mov word [esi + 0x20], ax
lea eax, [ebp - 0x14]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetComputerNameW]
test eax, eax
je 0x845c7d6
mov eax, dword [ebp - 0x14]
test eax, eax
js 0x845c684
cmp eax, dword [esi - 8]
jg 0x845c684
mov dword [esi - 0xc], eax
xor ecx, ecx
mov word [esi + eax*2], cx
push 0x20
mov dword [ebp - 0x24], 0x20
call fcn.0847e6ac
mov edi, eax
add esp, 4
test edi, edi
je 0x845c7fc
lea eax, [ebp - 0x18]
mov dword [ebp - 0x1c], 0
push eax
lea eax, [ebp - 0x1c]
push eax
push 0
lea eax, [ebp - 0x24]
push eax
push 0
push esi
push 0
call dword [sym.imp.ADVAPI32.dll_LookupAccountNameW]
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
call ebx
cmp eax, 0x7a
je 0x845c71b
push edi
call fcn.0849bbc3
add esp, 4
call ebx
jmp 0x845c802
push dword [ebp - 0x24]
push 0
push edi
call fcn.0849dde0
add esp, 0xc
lea eax, [ebp - 0x18]
lea ecx, [ebp - 0x28]
push eax
lea eax, [ebp - 0x1c]
push eax
push dword [ebp - 0x1c]
call fcn.0844e930
push eax
lea eax, [ebp - 0x24]
push eax
push edi
push esi
push 0
call dword [sym.imp.ADVAPI32.dll_LookupAccountNameW]
lea ecx, [ebp - 0x28]
push dword [ebp - 0x1c]
test eax, eax
jne 0x845c76d
call fcn.0840eae0
push edi
call fcn.0849bbc3
add esp, 4
call ebx
mov esi, dword [ebp - 0x28]
jmp 0x845c802
call fcn.0840eae0
push edi
call dword [sym.imp.ADVAPI32.dll_IsValidSid]
test eax, eax
jne 0x845c78d
push edi
call fcn.0849bbc3
add esp, 4
call ebx
mov esi, dword [ebp - 0x28]
jmp 0x845c802
lea eax, [ebp - 0x20]
mov dword [ebp - 0x20], 0
push eax
push edi
call sub.ADVAPI32.dll_ConvertSidToStringSidW
push dword [ebp - 0x20]
mov ecx, dword [ebp - 0x2c]
mov esi, eax
call fcn.08448b70
push dword [ebp - 0x20]
call dword [sym.imp.KERNEL32.dll_LocalFree]
push edi
mov dword [ebp - 0x20], 0
call fcn.0849bbc3
add esp, 4
test esi, esi
jne 0x845c7cf
call ebx
mov esi, dword [ebp - 0x28]
jmp 0x845c802
mov esi, dword [ebp - 0x28]
xor edi, edi
jmp 0x845c804
push dword [esi - 8]
push esi
call fcn.0849f12f
add esp, 8
test eax, eax
js 0x845c684
cmp eax, dword [esi - 8]
jg 0x845c684
xor ecx, ecx
mov dword [esi - 0xc], eax
mov word [esi + eax*2], cx
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
add esi, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
or ecx, 0xffffffff
lea eax, [esi + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x845c825
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, edi
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.0849cd1e
mov esp, ebp
pop ebp
ret