Function at 0x40b100
Capabilities:
Check os version
Create process on windows
Impersonate user

Disassembly:
push 0xffffffffffffffff
push 0x42e48c
mov eax, dword fs:[0]
push eax
sub esp, 0x998
mov eax, dword [0x43dd54]
xor eax, esp
mov dword [esp + 0x994], eax
push ebx
push esi
push edi
mov eax, dword [0x43dd54]
xor eax, esp
push eax
lea eax, [esp + 0x9a8]
mov dword fs:[0], eax
mov eax, 0x43f84c
xor esi, esi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40b144
sub eax, edx
sar eax, 1
je 0x40b762
cmp dword [0x43f94c], esi
je 0x40b576
cmp dword [0x440e50], esi
jne 0x40b762
push 0x114
xor ebx, ebx
lea eax, [esp + 0x74]
push ebx
push eax
call fcn.00419ed0
add esp, 0xc
lea ecx, [esp + 0x70]
push ecx
mov dword [esp + 0x74], 0x114
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
cmp dword [esp + 0x80], 2
jne 0x40b1af
cmp dword [esp + 0x74], 5
jb 0x40b1af
mov ebx, 1
mov dword [esp + 0x18], esi
test ebx, ebx
jne 0x40b212
mov eax, 0x43f84c
lea edx, [eax + 2]
nop
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40b1c0
sub eax, edx
sar eax, 1
je 0x40b212
lea edx, [esp + 0x18]
push edx
push 0
push 2
push 0x43f8cc
push 0
push 0x43f84c
call dword [sym.imp.ADVAPI32.dll_LogonUserW]
test eax, eax
jne 0x40b212
push 0x10
push 0x43fd78
push str.Could_not_authenticate_user.
push eax
call dword [sym.imp.USER32.dll_MessageBoxW]
push 0xffffffffffffffff
call dword [sym.imp.USER32.dll_PostQuitMessage]
xor eax, eax
jmp 0x40b785
push 0x44
lea eax, [esp + 0x30]
push 0
push eax
call fcn.00419ed0
mov eax, dword [0x43fb6c]
add esp, 0xc
push 0x104
lea edx, [esp + 0x7a0]
push edx
mov ecx, 5
push eax
mov dword [esp + 0x38], 0x44
mov word [esp + 0x68], cx
mov dword [esp + 0x64], 1
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
xor eax, eax
cmp word [esp + 0x79c], 0x22
je 0x40b2f0
jmp 0x40b270
movzx ecx, word [eax + 0x430d44]
mov word [esp + eax + 0x38c], cx
add eax, 2
test cx, cx
jne 0x40b270
lea eax, [esp + 0x79c]
mov edx, eax
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40b290
lea edi, [esp + 0x38c]
sub eax, edx
add edi, 0xfffffffe
jmp 0x40b2b0
mov cx, word [edi + 2]
add edi, 2
test cx, cx
jne 0x40b2b0
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x38c]
add edi, 0xfffffffe
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x40b2d6
mov ecx, dword [0x430d44]
mov dword [edi], ecx
jmp 0x40b308
movzx ecx, word [esp + eax + 0x79c]
mov word [esp + eax + 0x38c], cx
add eax, 2
test cx, cx
jne 0x40b2f0
lea edi, [esp + 0x38c]
add edi, 0xfffffffe
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x40b312
mov ecx, 6
mov esi, str.__HOSTRUNAS
rep movsd dword es:[edi], dword [esi]
mov eax, 0x43fe40
movsw word es:[edi], word [esi]
mov edx, eax
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40b333
lea edi, [esp + 0x38c]
sub eax, edx
add edi, 0xfffffffe
lea ebx, [ebx]
mov cx, word [edi + 2]
add edi, 2
test cx, cx
jne 0x40b350
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
test ebx, ebx
je 0x40b476
lea edx, [esp + 0x1c]
push edx
lea eax, [esp + 0x30]
push eax
push 0x43f220
push 0
push 0x20
lea ecx, [esp + 0x3a0]
push ecx
push 0
push 1
push 0x43f8cc
push 0
push 0x43f84c
call fcn.00404030
test eax, eax
je 0x40b3f3
mov eax, dword [esp + 0x1c]
mov esi, dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
lea edx, [esp + 0x10]
push edx
push eax
call esi
mov eax, dword [esp + 0x10]
cmp eax, 0x103
jne 0x40b785
mov edi, dword [sym.imp.KERNEL32.dll_Sleep]
nop
push 0x1f4
call edi
mov edx, dword [esp + 0x1c]
lea ecx, [esp + 0x10]
push ecx
push edx
call esi
mov eax, dword [esp + 0x10]
cmp eax, 0x103
je 0x40b3d0
jmp 0x40b785
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0
push 0x104
lea ecx, [esp + 0x18c]
push ecx
push 0x400
push eax
push 0
push 0x1200
call dword [sym.imp.KERNEL32.dll_FormatMessageW]
lea eax, [esp + 0x184]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40b425
sub eax, edx
sar eax, 1
lea eax, [esp + 0x184]
jne 0x40b442
mov eax, str.Unknown_error
push eax
lea edx, [esp + 0x598]
push 0x431774
push edx
call fcn.00403bc0
add esp, 0xc
push 0x10
push 0x43f120
lea eax, [esp + 0x59c]
push eax
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
push 0xffffffffffffffff
call fcn.0041c412
lea ecx, [esp + 0x1c]
push ecx
mov ecx, dword [esp + 0x1c]
lea edx, [esp + 0x30]
push edx
push 0x43f220
push 0
push 0x20
push 0
push 0
push 0
lea eax, [esp + 0x3ac]
push eax
push 0
push ecx
call dword [sym.imp.ADVAPI32.dll_CreateProcessAsUserW]
test eax, eax
je 0x40b4f3
mov eax, dword [esp + 0x1c]
mov esi, dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
lea edx, [esp + 0x10]
push edx
push eax
call esi
mov eax, dword [esp + 0x10]
cmp eax, 0x103
jne 0x40b785
mov edi, dword [sym.imp.KERNEL32.dll_Sleep]
nop
push 0x1f4
call edi
mov edx, dword [esp + 0x1c]
lea ecx, [esp + 0x10]
push ecx
push edx
call esi
mov eax, dword [esp + 0x10]
cmp eax, 0x103
je 0x40b4d0
jmp 0x40b785
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0
push 0x104
lea ecx, [esp + 0x18c]
push ecx
push 0x400
push eax
push 0
push 0x1200
call dword [sym.imp.KERNEL32.dll_FormatMessageW]
lea eax, [esp + 0x184]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40b525
sub eax, edx
sar eax, 1
lea eax, [esp + 0x184]
jne 0x40b542
mov eax, str.Unknown_error
push eax
lea edx, [esp + 0x598]
push 0x431774
push edx
call fcn.00403bc0
add esp, 0xc
push 0x10
push 0x43f120
lea eax, [esp + 0x59c]
push eax
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
push 0xffffffffffffffff
call fcn.0041c412
push 0x40
push 0x43f84c
call fcn.0041a499
add esp, 8
test eax, eax
je 0x40b5ab
push 0x440e54
push 0
push 2
push 0x43f8cc
push 0
push 0x43f84c
call dword [sym.imp.ADVAPI32.dll_LogonUserW]
mov esi, eax
jmp 0x40b71a
call fcn.0040e3a5
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x40b5c5
push 0x80004005
call fcn.004010a0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x10], eax
push 0x5c
push 0x43f84c
mov dword [esp + 0x9b8], 0
call fcn.0041a499
add esp, 8
lea ecx, [esp + 0x10]
test eax, eax
je 0x40b6c9
push 0x43f84c
call fcn.00401a70
mov esi, dword [esp + 0x10]
cmp dword [esi - 0xc], 0
jg 0x40b614
or esi, 0xffffffff
jmp 0x40b62e
push 0x5c
push esi
call fcn.0041a499
add esp, 8
test eax, eax
jne 0x40b628
or esi, 0xffffffff
jmp 0x40b62e
sub eax, esi
sar eax, 1
mov esi, eax
lea ecx, [esp + 0x18]
call fcn.00401730
lea ecx, [esi + 1]
push ecx
lea edx, [esp + 0x18]
push edx
lea ecx, [esp + 0x18]
mov byte [esp + 0x9b8], 1
call fcn.00402dc0
push eax
lea ecx, [esp + 0x1c]
mov byte [esp + 0x9b4], 2
call fcn.00401900
lea ecx, [esp + 0x14]
mov byte [esp + 0x9b0], 1
call fcn.004015e0
push esi
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x18]
call fcn.00402b50
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x9b4], 3
call fcn.00401900
lea ecx, [esp + 0x14]
call fcn.004015e0
mov edi, dword [esp + 0x10]
mov ecx, dword [esp + 0x18]
push 0x440e54
push 0
push 2
push 0x43f8cc
push edi
push ecx
call dword [sym.imp.ADVAPI32.dll_LogonUserW]
lea ecx, [esp + 0x18]
mov esi, eax
call fcn.004015e0
jmp 0x40b6f3
push 0x431770
call fcn.00402750
mov edi, dword [esp + 0x10]
push 0x440e54
push 0
push 2
push 0x43f8cc
push edi
push 0x43f84c
call dword [sym.imp.ADVAPI32.dll_LogonUserW]
mov esi, eax
lea eax, [edi - 0x10]
mov dword [esp + 0x9b0], 0xffffffff
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40b71a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
test esi, esi
je 0x40b827
mov ecx, dword [0x440e54]
push ecx
call dword [sym.imp.ADVAPI32.dll_ImpersonateLoggedOnUser]
test eax, eax
je 0x40b7ac
mov edx, dword [0x440e54]
mov esi, 1
push esi
push str.SeAssignPrimaryTokenPrivilege
push edx
call fcn.00403d80
mov eax, dword [0x440e54]
push esi
push str.SeTcbPrivilege
push eax
call fcn.00403d80
add esp, 0x18
call fcn.00405b70
call fcn.00404f90
call fcn.0040a510
call fcn.004052b0
test esi, esi
je 0x40b780
call dword [sym.imp.ADVAPI32.dll_RevertToSelf]
mov eax, dword [0x440e44]
mov ecx, dword [esp + 0x9a8]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x994]
xor ecx, esp
call fcn.00419eb3
add esp, 0x9a4
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0
push 0x104
lea ecx, [esp + 0x18c]
push ecx
push 0x400
push eax
push 0
push 0x1200
call dword [sym.imp.KERNEL32.dll_FormatMessageW]
lea eax, [esp + 0x184]
lea edx, [eax + 2]
mov edi, edi
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40b7e0
sub eax, edx
sar eax, 1
lea eax, [esp + 0x184]
jne 0x40b7fd
mov eax, str.Unknown_error
push eax
lea edx, [esp + 0x598]
push str.Impersonate_user_failed_:__s
push edx
call fcn.00403bc0
lea eax, [esp + 0x5a0]
push eax
call fcn.0041bdca
add esp, 0x10
push 0xffffffffffffffff
call fcn.0041c412
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0
push 0x104
lea ecx, [esp + 0x18c]
push ecx
push 0x400
push eax
push 0
push 0x1200
call dword [sym.imp.KERNEL32.dll_FormatMessageW]
lea eax, [esp + 0x184]
lea edx, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40b860
sub eax, edx
sar eax, 1
lea eax, [esp + 0x184]
jne 0x40b87d
mov eax, str.Unknown_error
push eax
lea edx, [esp + 0x598]
push str.Logon_user_failed_:__s
push edx
call fcn.00403bc0
lea eax, [esp + 0x5a0]
push eax
call fcn.0041bdca
add esp, 0x10
push 0xffffffffffffffff
call fcn.0041c412
int3