Function at 0x45a8c4
Capabilities:
Impersonate user

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffa8c
mov eax, 0x51c510
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov ebx, dword [ebp + 0x1c]
mov esi, dword [ebp + 0xc]
call fcn.004d08c0
mov dword [ebp - 0x34], 0x4000210
xor edx, edx
xor ecx, ecx
mov dword [ebp - 0x38], edx
mov dword [ebp - 0x3c], ecx
xor eax, eax
xor edx, edx
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x44], edx
xor ecx, ecx
xor eax, eax
mov dword [ebp - 0x48], ecx
xor edx, edx
mov dword [ebp - 0x50], eax
xor ecx, ecx
mov dword [ebp - 0x58], edx
mov dword [ebp - 0x60], ecx
mov word [ebp - 0x14], 8
mov dword [ebp - 0x5c], esi
test esi, esi
je 0x45a92a
mov al, byte [esi]
test al, al
jne 0x45a92a
xor edx, edx
mov dword [ebp - 0x5c], edx
push 0
call sub.KERNEL32.dll_Sleep
push 0x64
call sub.KERNEL32.dll_Sleep
push 0
call sub.KERNEL32.dll_Sleep
push 0xffffeeee
push 0xffffeeee
push 0x5d5089
push 0x5d5084
mov ecx, dword [ebp + 0x20]
push ecx
call fcn.0045766c
add esp, 0x14
call fcn.00457cac
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 0x28]
push eax
call fcn.00457ce8
pop ecx
mov dword [ebp - 0x3c], eax
push 0xffffeeee
push 0xffffeeee
push edi
push 0x5d50a8
mov edx, dword [ebp + 0x20]
push edx
call fcn.0045766c
add esp, 0x14
test edi, edi
jne 0x45a9e5
mov ecx, dword [ebp - 0x3c]
mov dword [ebp - 0x38], ecx
mov eax, dword [ebp - 0x38]
test eax, eax
jne 0x45a9ea
push 0xffffeeee
call sub.KERNEL32.dll_GetLastError
push eax
push 0x5d50b2
push 0x5d50ad
mov edx, dword [ebp + 0x20]
push edx
call fcn.0045766c
add esp, 0x14
test ebx, ebx
je 0x45a9da
call sub.KERNEL32.dll_GetLastError
push eax
push 0x5d50c1
push ebx
call fcn.004d26c8
add esp, 0xc
mov word [ebp - 0x14], 0
jmp 0x45b2b1
xor ecx, ecx
mov dword [ebp - 0x38], ecx
mov eax, dword [ebp - 0x38]
test eax, eax
jne 0x45aa33
mov edx, dword [ebp - 0x28]
cmp edx, 0xffffffff
je 0x45aa33
mov ecx, dword [ebp - 0x28]
push ecx
call sub.KERNEL32.dll_GetLastError
push eax
push 0x5d50d5
push 0x5d50d0
mov eax, dword [ebp + 0x20]
push eax
call fcn.0045766c
add esp, 0x14
push 0
mov edx, dword [ebp - 0x3c]
push edx
mov ecx, dword [ebp - 0x5c]
push ecx
mov eax, dword [ebp + 0x10]
push eax
push edi
call fcn.0045708c
add esp, 0x14
mov dword [ebp - 0x38], eax
mov edx, dword [ebp - 0x38]
test edx, edx
jne 0x45aa79
mov ecx, dword [ebp - 0x28]
push ecx
call sub.KERNEL32.dll_GetLastError
push eax
push 0x5d50e8
push 0x5d50e3
mov eax, dword [ebp + 0x20]
push eax
call fcn.0045766c
add esp, 0x14
lea edx, [ebp - 0x38]
push edx
push 0
push 2
mov ecx, dword [ebp + 0x10]
push ecx
mov eax, dword [ebp - 0x5c]
push eax
push edi
call sub.ADVAPI32.dll_LogonUserA
test eax, eax
jne 0x45aa79
xor edx, edx
mov dword [ebp - 0x38], edx
mov ecx, dword [ebp - 0x38]
test ecx, ecx
jne 0x45aac4
push 0xffffeeee
call sub.KERNEL32.dll_GetLastError
push eax
push 0x5d50f8
push 0x5d50f3
mov eax, dword [ebp + 0x20]
push eax
call fcn.0045766c
add esp, 0x14
test ebx, ebx
je 0x45aab9
call sub.KERNEL32.dll_GetLastError
push eax
push 0x5d5106
push ebx
call fcn.004d26c8
add esp, 0xc
mov word [ebp - 0x14], 0
jmp 0x45b2b1
xor edx, edx
xor ecx, ecx
mov dword [ebp - 0x64], edx
mov word [ebp - 0x14], 8
mov dword [ebp - 0x574], 0xc
mov dword [ebp - 0x570], ecx
mov dword [ebp - 0x56c], 1
push 0xffffeeee
push 0xffffeeee
push 0x5d5119
push 0x5d5114
mov eax, dword [ebp + 0x20]
push eax
call fcn.0045766c
add esp, 0x14
lea edx, [ebp - 0x64]
push edx
push 1
push 2
lea ecx, [ebp - 0x574]
push ecx
push 0x2000000
mov eax, dword [ebp - 0x38]
push eax
call sub.ADVAPI32.dll_DuplicateTokenEx
mov edx, dword [ebp - 0x64]
test edx, edx
je 0x45ab5e
push 0xffffeeee
push 0xffffeeee
push 0x5d5128
push 0x5d5123
mov ecx, dword [ebp + 0x20]
push ecx
call fcn.0045766c
add esp, 0x14
mov eax, dword [ebp - 0x38]
push eax
call sub.KERNEL32.dll_CloseHandle
mov edx, dword [ebp - 0x64]
mov dword [ebp - 0x38], edx
push 0xffffeeee
push 0xffffeeee
push 0x5d5137
push 0x5d5132
mov eax, dword [ebp + 0x20]
mov esi, 0xc
push eax
call fcn.0045766c
add esp, 0x14
mov edx, dword [ebp - 0x28]
cmp edx, 0xffffffff
je 0x45acc1
mov dword [ebp - 0x2c], 0xffffffff
lea ecx, [ebp - 0x30]
lea eax, [ebp - 0x2c]
push ecx
push 4
push eax
push esi
mov edx, dword [ebp - 0x38]
push edx
call sub.ADVAPI32.dll_GetTokenInformation
test eax, eax
jne 0x45abcb
push esi
call sub.KERNEL32.dll_GetLastError
push eax
push 0x5d5143
push 0x5d513e
mov ecx, dword [ebp + 0x20]
push ecx
call fcn.0045766c
add esp, 0x14
mov eax, dword [ebp - 0x28]
push eax
mov edx, dword [ebp - 0x2c]
push edx
push 0x5d5154
push 0x5d514f
mov ecx, dword [ebp + 0x20]
push ecx
call fcn.0045766c
add esp, 0x14
push 0x5d515f
call fcn.004036e4
pop ecx
mov dword [ebp - 0x4c], eax
push 1
push 0x5d516e
call fcn.004038c8
add esp, 8
push 4
lea eax, [ebp - 0x28]
push eax
push esi
mov edx, dword [ebp - 0x38]
push edx
call sub.ADVAPI32.dll_SetTokenInformation
test eax, eax
jne 0x45ac39
push esi
call sub.KERNEL32.dll_GetLastError
push eax
push 0x5d5182
push 0x5d517d
mov ecx, dword [ebp + 0x20]
push ecx
call fcn.0045766c
add esp, 0x14
jmp 0x45ac56
push esi
call sub.KERNEL32.dll_GetLastError
push eax
push 0x5d5192
push 0x5d518d
mov eax, dword [ebp + 0x20]
push eax
call fcn.0045766c
add esp, 0x14
mov edx, dword [ebp - 0x4c]
push edx
push 0x5d5198
call fcn.004038c8
add esp, 8
lea ecx, [ebp - 0x30]
mov dword [ebp - 0x2c], 0xffffffff
push ecx
lea eax, [ebp - 0x2c]
push 4
push eax
push esi
mov edx, dword [ebp - 0x38]
push edx
call sub.ADVAPI32.dll_GetTokenInformation
test eax, eax
jne 0x45aca3
push esi
call sub.KERNEL32.dll_GetLastError
push eax
push 0x5d51ac
push 0x5d51a7
mov ecx, dword [ebp + 0x20]
push ecx
call fcn.0045766c
add esp, 0x14
mov eax, dword [ebp - 0x28]
push eax
mov edx, dword [ebp - 0x2c]
push edx
push 0x5d51be
push 0x5d51b9
mov ecx, dword [ebp + 0x20]
push ecx
call fcn.0045766c
add esp, 0x14
push 0xffffeeee
push 0xffffeeee
push 0x5d51cf
push 0x5d51ca
mov eax, dword [ebp + 0x20]
push eax
call fcn.0045766c
add esp, 0x14
call sub.USER32.dll_GetProcessWindowStation
mov dword [ebp - 0x48], eax
test eax, eax
jne 0x45ad31
push 0xffffeeee
call sub.KERNEL32.dll_GetLastError
push eax
push 0x5d51e1
push 0x5d51dc
mov edx, dword [ebp + 0x20]
push edx
call fcn.0045766c
add esp, 0x14
test ebx, ebx
je 0x45ad26
call sub.KERNEL32.dll_GetLastError
push eax
push 0x5d51f2
push ebx
call fcn.004d26c8
add esp, 0xc
mov word [ebp - 0x14], 0
jmp 0x45b2b1
push 0xffffeeee
push 0xffffeeee
push 0x5d5203
push 0x5d51fe
mov ecx, dword [ebp + 0x20]
push ecx
call fcn.0045766c
add esp, 0x14
push 0x60000
push 1
push 0x5d5211
call sub.USER32.dll_OpenWindowStationA
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x44]
test eax, eax
jne 0x45adb0
push 0xffffeeee
call sub.KERNEL32.dll_GetLastError
push eax
push 0x5d521e
push 0x5d5219
mov edx, dword [ebp + 0x20]
push edx
call fcn.0045766c
add esp, 0x14
test ebx, ebx
je 0x45ada5
call sub.KERNEL32.dll_GetLastError
push eax
push 0x5d5230
push ebx
call fcn.004d26c8
add esp, 0xc
mov word [ebp - 0x14], 0
jmp 0x45b2b1
push 0xffffeeee
push 0xffffeeee
push 0x5d5241
push 0x5d523c
mov ecx, dword [ebp + 0x20]
push ecx
call fcn.0045766c
add esp, 0x14
mov eax, dword [ebp - 0x44]
push eax
call sub.USER32.dll_SetProcessWindowStation
test eax, eax
jne 0x45ae21
push 0xffffeeee
call sub.KERNEL32.dll_GetLastError
push eax
push 0x5d5253
push 0x5d524e
mov edx, dword [ebp + 0x20]
push edx
call fcn.0045766c
add esp, 0x14
test ebx, ebx
je 0x45ae16
call sub.KERNEL32.dll_GetLastError
push eax
push 0x5d5264
push ebx
call fcn.004d26c8
add esp, 0xc
mov word [ebp - 0x14], 0
jmp 0x45b2b1
push 0xffffeeee
push 0xffffeeee
push 0x5d5275
push 0x5d5270
mov ecx, dword [ebp + 0x20]
push ecx
call fcn.0045766c
add esp, 0x14
push 0x10000000
push 0
push 0
push 0x5d5281
call sub.USER32.dll_OpenDesktopA
mov dword [ebp - 0x40], eax
mov eax, dword [ebp - 0x40]
test eax, eax
jne 0x45aea2
push 0xffffeeee
call sub.KERNEL32.dll_GetLastError
push eax
push 0x5d528e
push 0x5d5289
mov edx, dword [ebp + 0x20]
push edx
call fcn.0045766c
add esp, 0x14
test ebx, ebx
je 0x45ae97
call sub.KERNEL32.dll_GetLastError
push eax
push 0x5d529e
push ebx
call fcn.004d26c8
add esp, 0xc
mov word [ebp - 0x14], 0
jmp 0x45b2b1
push 0xffffeeee
push 0xffffeeee
push 0x5d52af
push 0x5d52aa
mov ecx, dword [ebp + 0x20]
push ecx
call fcn.0045766c
add esp, 0x14
mov eax, dword [ebp - 0x48]
push eax
call sub.USER32.dll_SetProcessWindowStation
test eax, eax
jne 0x45af13
push 0xffffeeee
call sub.KERNEL32.dll_GetLastError
push eax
push 0x5d52c5
push 0x5d52c0
mov edx, dword [ebp + 0x20]
push edx
call fcn.0045766c
add esp, 0x14
test ebx, ebx
je 0x45af08
call sub.KERNEL32.dll_GetLastError
push eax
push 0x5d52da
push ebx
call fcn.004d26c8
add esp, 0xc
mov word [ebp - 0x14], 0
jmp 0x45b2b1
push 0xffffeeee
push 0xffffeeee
push 0x5d52eb
push 0x5d52e6
mov ecx, dword [ebp + 0x20]
push ecx
call fcn.0045766c
add esp, 0x14
mov eax, dword [ebp + 0x20]
lea edx, [ebp - 0x464]
push eax
push 0x400
push edx
mov ecx, dword [ebp - 0x38]
push ecx
call fcn.004450a0
add esp, 0x10
test eax, eax
jne 0x45af97
push 0xffffeeee
call sub.KERNEL32.dll_GetLastError
push eax
push 0x5d52fe
push 0x5d52f9
mov eax, dword [ebp + 0x20]
push eax
call fcn.0045766c
add esp, 0x14
test ebx, ebx
je 0x45af8c
call sub.KERNEL32.dll_GetLastError
push eax
push 0x5d530f
push ebx
call fcn.004d26c8
add esp, 0xc
mov word [ebp - 0x14], 0
jmp 0x45b2b1
push 0xffffeeee
push 0xffffeeee
push 0x5d5320
push 0x5d531b
mov edx, dword [ebp + 0x20]
push edx
call fcn.0045766c
add esp, 0x14
mov ecx, dword [ebp + 0x20]
push ecx
lea eax, [ebp - 0x464]
push eax
mov edx, dword [ebp - 0x44]
push edx
call fcn.0045b400
add esp, 0xc
test eax, eax
jne 0x45b00b
push 0xffffeeee
call sub.KERNEL32.dll_GetLastError
push eax
push 0x5d5335
push 0x5d5330
mov ecx, dword [ebp + 0x20]
push ecx
call fcn.0045766c
add esp, 0x14
test ebx, ebx
je 0x45b00b
call sub.KERNEL32.dll_GetLastError
push eax
push 0x5d5349
push ebx
call fcn.004d26c8
add esp, 0xc
push 0xffffeeee
push 0xffffeeee
push 0x5d535a
push 0x5d5355
mov eax, dword [ebp + 0x20]
push eax
call fcn.0045766c
add esp, 0x14
mov edx, dword [ebp + 0x20]
push edx
lea ecx, [ebp - 0x464]
push ecx
mov eax, dword [ebp - 0x40]
push eax
call fcn.0045b8a8
add esp, 0xc
test eax, eax
jne 0x45b07f
push 0xffffeeee
call sub.KERNEL32.dll_GetLastError
push eax
push 0x5d536d
push 0x5d5368
mov edx, dword [ebp + 0x20]
push edx
call fcn.0045766c
add esp, 0x14
test ebx, ebx
je 0x45b07f
call sub.KERNEL32.dll_GetLastError
push eax
push 0x5d537f
push ebx
call fcn.004d26c8
add esp, 0xc
lea ecx, [ebp - 0x54]
lea eax, [ebp - 0x568]
push ecx
push eax
mov edx, dword [ebp - 0x38]
push edx
call fcn.00445f1c
add esp, 0xc
test eax, eax
jne 0x45b0bb
push 0xffffeeee
call sub.KERNEL32.dll_GetLastError
push eax
push 0x5d5390
push 0x5d538b
mov ecx, dword [ebp + 0x20]
push ecx
call fcn.0045766c
add esp, 0x14
push 0xffffeeee
push 0xffffeeee
push 0x5d53a7
push 0x5d53a2
mov eax, dword [ebp + 0x20]
push eax
call fcn.0045766c
add esp, 0x14
lea edx, [ebp - 0x50]
lea ecx, [ebp - 0x38]
push 0
push edx
push ecx
push edi
call fcn.00445c70
add esp, 0x10
test eax, eax
je 0x45b113
push 0xffffeeee
call sub.KERNEL32.dll_GetLastError
push eax
push 0x5d53bc
push 0x5d53b7
mov eax, dword [ebp + 0x20]
push eax
call fcn.0045766c
add esp, 0x14
push 0xffffeeee
push 0xffffeeee
push 0x5d53d5
push 0x5d53d0
mov edx, dword [ebp + 0x20]
push edx
call fcn.0045766c
add esp, 0x14
push 1
mov ecx, dword [ebp - 0x38]
push ecx
lea eax, [ebp - 0x58]
push eax
call fcn.00457c04
add esp, 0xc
test eax, eax
je 0x45b173
push 0xffffeeee
call sub.KERNEL32.dll_GetLastError
push eax
push 0x5d53e6
push 0x5d53e1
mov edx, dword [ebp + 0x20]
push edx
call fcn.0045766c
add esp, 0x14
or dword [ebp - 0x34], 0x400
jmp 0x45b199
xor ecx, ecx
mov dword [ebp - 0x58], ecx
push 0xffffeeee
call sub.KERNEL32.dll_GetLastError
push eax
push 0x5d53ff
push 0x5d53fa
mov eax, dword [ebp + 0x20]
push eax
call fcn.0045766c
add esp, 0x14
mov edx, dword [ebp - 0x38]
test edx, edx
je 0x45b1a9
mov ecx, dword [ebp - 0x38]
push ecx
call sub.ADVAPI32.dll_ImpersonateLoggedOnUser
push 0xffffeeee
call sub.KERNEL32.dll_GetLastError
push eax
push 0x5d5420
push 0x5d541b
mov eax, dword [ebp + 0x20]
push eax
call fcn.0045766c
add esp, 0x14
push 0x5d542f
mov edx, dword [ebp - 0x58]
push edx
mov ecx, dword [ebp - 0x34]
push ecx
mov eax, dword [ebp + 0x18]
push eax
mov edx, dword [ebp + 0x14]
push edx
push 0
mov ecx, dword [ebp - 0x38]
push ecx
call fcn.00457894
add esp, 0x1c
test eax, eax
jne 0x45b23e
mov eax, dword [ebp - 0x38]
test eax, eax
je 0x45b1fd
call sub.ADVAPI32.dll_RevertToSelf
push 0xffffeeee
call sub.KERNEL32.dll_GetLastError
push eax
push 0x5d5444
push 0x5d543f
mov edx, dword [ebp + 0x20]
push edx
call fcn.0045766c
add esp, 0x14
test ebx, ebx
je 0x45b236
call sub.KERNEL32.dll_GetLastError
push eax
push 0x5d5457
push ebx
call fcn.004d26c8
add esp, 0xc
mov word [ebp - 0x14], 0
jmp 0x45b2b1
mov ecx, dword [ebp - 0x38]
test ecx, ecx
je 0x45b24a
call sub.ADVAPI32.dll_RevertToSelf
mov dword [ebp - 0x60], 1
test ebx, ebx
je 0x45b269
call sub.KERNEL32.dll_GetLastError
push eax
push 0x5d5463
push ebx
call fcn.004d26c8
add esp, 0xc
push 0xffffeeee
call sub.KERNEL32.dll_GetLastError
push eax
push 0x5d5474
push 0x5d546f
mov eax, dword [ebp + 0x20]
push eax
call fcn.0045766c
add esp, 0x14
mov word [ebp - 0x14], 0
jmp 0x45b2b1
push 0xffffeeee
call sub.KERNEL32.dll_GetLastError
push eax
push 0x5d548f
push 0x5d548a
mov ecx, dword [ebp + 0x20]
push ecx
call fcn.0045766c
add esp, 0x14
mov word [ebp - 0x14], 0x14
push 0xffffeeee
push 0xffffeeee
push 0x5d549c
push 0x5d5497
mov eax, dword [ebp + 0x20]
push eax
call fcn.0045766c
add esp, 0x14
mov edx, dword [ebp - 0x58]
test edx, edx
je 0x45b309
lea ecx, [ebp - 0x58]
push ecx
call fcn.00457c5c
pop ecx
push 0xffffeeee
push 0xffffeeee
push 0x5d54ac
push 0x5d54a7
mov eax, dword [ebp + 0x20]
push eax
call fcn.0045766c
add esp, 0x14
mov edx, dword [ebp - 0x48]
test edx, edx
je 0x45b339
mov ecx, dword [ebp - 0x48]
push ecx
call sub.USER32.dll_SetProcessWindowStation
mov eax, dword [ebp - 0x44]
test eax, eax
je 0x45b349
mov edx, dword [ebp - 0x44]
push edx
call sub.USER32.dll_CloseWindowStation
mov ecx, dword [ebp - 0x40]
test ecx, ecx
je 0x45b359
mov eax, dword [ebp - 0x40]
push eax
call sub.USER32.dll_CloseDesktop
push 0
lea edx, [ebp - 0x50]
push edx
lea ecx, [ebp - 0x38]
push ecx
call fcn.00445c94
add esp, 0xc
mov eax, dword [ebp - 0x38]
test eax, eax
je 0x45b37b
mov edx, dword [ebp - 0x38]
push edx
call sub.KERNEL32.dll_CloseHandle
mov ecx, dword [ebp - 0x3c]
test ecx, ecx
je 0x45b38b
mov eax, dword [ebp - 0x3c]
push eax
call sub.KERNEL32.dll_CloseHandle
mov word [ebp - 0x14], 0
jmp 0x45b3b2
push 0xffffeeee
push 0xffffeeee
push 0x5d54c9
push 0x5d54c4
mov ecx, dword [ebp + 0x20]
push ecx
call fcn.0045766c
add esp, 0x14
mov eax, dword [ebp - 0x60]
mov edx, dword [ebp - 0x24]
mov dword fs:[0], edx
mov esp, ebp
mov edi, dword [ebp - 0x580]
mov esi, dword [ebp - 0x57c]
mov ebx, dword [ebp - 0x578]
pop ebp
ret