Function at 0x45d628
Capabilities:
Impersonate user

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffa8c
mov eax, 0x530d18
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov ebx, dword [ebp + 0x1c]
mov esi, dword [ebp + 0xc]
call fcn.004d57f0
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 0x45d68e
mov al, byte [esi]
test al, al
jne 0x45d68e
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 0x5ee77d
push 0x5ee778
mov ecx, dword [ebp + 0x20]
push ecx
call fcn.0045a3d0
add esp, 0x14
call fcn.0045aa10
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 0x28]
push eax
call fcn.0045aa4c
pop ecx
mov dword [ebp - 0x3c], eax
push 0xffffeeee
push 0xffffeeee
push edi
push 0x5ee79c
mov edx, dword [ebp + 0x20]
push edx
call fcn.0045a3d0
add esp, 0x14
test edi, edi
jne 0x45d749
mov ecx, dword [ebp - 0x3c]
mov dword [ebp - 0x38], ecx
mov eax, dword [ebp - 0x38]
test eax, eax
jne 0x45d74e
push 0xffffeeee
call sub.KERNEL32.dll_GetLastError
push eax
push 0x5ee7a6
push 0x5ee7a1
mov edx, dword [ebp + 0x20]
push edx
call fcn.0045a3d0
add esp, 0x14
test ebx, ebx
je 0x45d73e
call sub.KERNEL32.dll_GetLastError
push eax
push 0x5ee7b5
push ebx
call fcn.004d75f8
add esp, 0xc
mov word [ebp - 0x14], 0
jmp 0x45e015
xor ecx, ecx
mov dword [ebp - 0x38], ecx
mov eax, dword [ebp - 0x38]
test eax, eax
jne 0x45d797
mov edx, dword [ebp - 0x28]
cmp edx, 0xffffffff
je 0x45d797
mov ecx, dword [ebp - 0x28]
push ecx
call sub.KERNEL32.dll_GetLastError
push eax
push 0x5ee7c9
push 0x5ee7c4
mov eax, dword [ebp + 0x20]
push eax
call fcn.0045a3d0
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.00459df0
add esp, 0x14
mov dword [ebp - 0x38], eax
mov edx, dword [ebp - 0x38]
test edx, edx
jne 0x45d7dd
mov ecx, dword [ebp - 0x28]
push ecx
call sub.KERNEL32.dll_GetLastError
push eax
push 0x5ee7dc
push 0x5ee7d7
mov eax, dword [ebp + 0x20]
push eax
call fcn.0045a3d0
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 0x45d7dd
xor edx, edx
mov dword [ebp - 0x38], edx
mov ecx, dword [ebp - 0x38]
test ecx, ecx
jne 0x45d828
push 0xffffeeee
call sub.KERNEL32.dll_GetLastError
push eax
push 0x5ee7ec
push 0x5ee7e7
mov eax, dword [ebp + 0x20]
push eax
call fcn.0045a3d0
add esp, 0x14
test ebx, ebx
je 0x45d81d
call sub.KERNEL32.dll_GetLastError
push eax
push 0x5ee7fa
push ebx
call fcn.004d75f8
add esp, 0xc
mov word [ebp - 0x14], 0
jmp 0x45e015
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 0x5ee80d
push 0x5ee808
mov eax, dword [ebp + 0x20]
push eax
call fcn.0045a3d0
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 0x45d8c2
push 0xffffeeee
push 0xffffeeee
push 0x5ee81c
push 0x5ee817
mov ecx, dword [ebp + 0x20]
push ecx
call fcn.0045a3d0
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 0x5ee82b
push 0x5ee826
mov eax, dword [ebp + 0x20]
mov esi, 0xc
push eax
call fcn.0045a3d0
add esp, 0x14
mov edx, dword [ebp - 0x28]
cmp edx, 0xffffffff
je 0x45da25
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 0x45d92f
push esi
call sub.KERNEL32.dll_GetLastError
push eax
push 0x5ee837
push 0x5ee832
mov ecx, dword [ebp + 0x20]
push ecx
call fcn.0045a3d0
add esp, 0x14
mov eax, dword [ebp - 0x28]
push eax
mov edx, dword [ebp - 0x2c]
push edx
push 0x5ee848
push 0x5ee843
mov ecx, dword [ebp + 0x20]
push ecx
call fcn.0045a3d0
add esp, 0x14
push 0x5ee853
call fcn.00403700
pop ecx
mov dword [ebp - 0x4c], eax
push 1
push 0x5ee862
call fcn.004038e4
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 0x45d99d
push esi
call sub.KERNEL32.dll_GetLastError
push eax
push 0x5ee876
push 0x5ee871
mov ecx, dword [ebp + 0x20]
push ecx
call fcn.0045a3d0
add esp, 0x14
jmp 0x45d9ba
push esi
call sub.KERNEL32.dll_GetLastError
push eax
push 0x5ee886
push 0x5ee881
mov eax, dword [ebp + 0x20]
push eax
call fcn.0045a3d0
add esp, 0x14
mov edx, dword [ebp - 0x4c]
push edx
push 0x5ee88c
call fcn.004038e4
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 0x45da07
push esi
call sub.KERNEL32.dll_GetLastError
push eax
push 0x5ee8a0
push 0x5ee89b
mov ecx, dword [ebp + 0x20]
push ecx
call fcn.0045a3d0
add esp, 0x14
mov eax, dword [ebp - 0x28]
push eax
mov edx, dword [ebp - 0x2c]
push edx
push 0x5ee8b2
push 0x5ee8ad
mov ecx, dword [ebp + 0x20]
push ecx
call fcn.0045a3d0
add esp, 0x14
push 0xffffeeee
push 0xffffeeee
push 0x5ee8c3
push 0x5ee8be
mov eax, dword [ebp + 0x20]
push eax
call fcn.0045a3d0
add esp, 0x14
call sub.USER32.dll_GetProcessWindowStation
mov dword [ebp - 0x48], eax
test eax, eax
jne 0x45da95
push 0xffffeeee
call sub.KERNEL32.dll_GetLastError
push eax
push 0x5ee8d5
push 0x5ee8d0
mov edx, dword [ebp + 0x20]
push edx
call fcn.0045a3d0
add esp, 0x14
test ebx, ebx
je 0x45da8a
call sub.KERNEL32.dll_GetLastError
push eax
push 0x5ee8e6
push ebx
call fcn.004d75f8
add esp, 0xc
mov word [ebp - 0x14], 0
jmp 0x45e015
push 0xffffeeee
push 0xffffeeee
push 0x5ee8f7
push 0x5ee8f2
mov ecx, dword [ebp + 0x20]
push ecx
call fcn.0045a3d0
add esp, 0x14
push 0x60000
push 1
push 0x5ee905
call sub.USER32.dll_OpenWindowStationA
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x44]
test eax, eax
jne 0x45db14
push 0xffffeeee
call sub.KERNEL32.dll_GetLastError
push eax
push 0x5ee912
push 0x5ee90d
mov edx, dword [ebp + 0x20]
push edx
call fcn.0045a3d0
add esp, 0x14
test ebx, ebx
je 0x45db09
call sub.KERNEL32.dll_GetLastError
push eax
push 0x5ee924
push ebx
call fcn.004d75f8
add esp, 0xc
mov word [ebp - 0x14], 0
jmp 0x45e015
push 0xffffeeee
push 0xffffeeee
push 0x5ee935
push 0x5ee930
mov ecx, dword [ebp + 0x20]
push ecx
call fcn.0045a3d0
add esp, 0x14
mov eax, dword [ebp - 0x44]
push eax
call sub.USER32.dll_SetProcessWindowStation
test eax, eax
jne 0x45db85
push 0xffffeeee
call sub.KERNEL32.dll_GetLastError
push eax
push 0x5ee947
push 0x5ee942
mov edx, dword [ebp + 0x20]
push edx
call fcn.0045a3d0
add esp, 0x14
test ebx, ebx
je 0x45db7a
call sub.KERNEL32.dll_GetLastError
push eax
push 0x5ee958
push ebx
call fcn.004d75f8
add esp, 0xc
mov word [ebp - 0x14], 0
jmp 0x45e015
push 0xffffeeee
push 0xffffeeee
push 0x5ee969
push 0x5ee964
mov ecx, dword [ebp + 0x20]
push ecx
call fcn.0045a3d0
add esp, 0x14
push 0x10000000
push 0
push 0
push 0x5ee975
call sub.USER32.dll_OpenDesktopA
mov dword [ebp - 0x40], eax
mov eax, dword [ebp - 0x40]
test eax, eax
jne 0x45dc06
push 0xffffeeee
call sub.KERNEL32.dll_GetLastError
push eax
push 0x5ee982
push 0x5ee97d
mov edx, dword [ebp + 0x20]
push edx
call fcn.0045a3d0
add esp, 0x14
test ebx, ebx
je 0x45dbfb
call sub.KERNEL32.dll_GetLastError
push eax
push 0x5ee992
push ebx
call fcn.004d75f8
add esp, 0xc
mov word [ebp - 0x14], 0
jmp 0x45e015
push 0xffffeeee
push 0xffffeeee
push 0x5ee9a3
push 0x5ee99e
mov ecx, dword [ebp + 0x20]
push ecx
call fcn.0045a3d0
add esp, 0x14
mov eax, dword [ebp - 0x48]
push eax
call sub.USER32.dll_SetProcessWindowStation
test eax, eax
jne 0x45dc77
push 0xffffeeee
call sub.KERNEL32.dll_GetLastError
push eax
push 0x5ee9b9
push 0x5ee9b4
mov edx, dword [ebp + 0x20]
push edx
call fcn.0045a3d0
add esp, 0x14
test ebx, ebx
je 0x45dc6c
call sub.KERNEL32.dll_GetLastError
push eax
push 0x5ee9ce
push ebx
call fcn.004d75f8
add esp, 0xc
mov word [ebp - 0x14], 0
jmp 0x45e015
push 0xffffeeee
push 0xffffeeee
push 0x5ee9df
push 0x5ee9da
mov ecx, dword [ebp + 0x20]
push ecx
call fcn.0045a3d0
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.004471b4
add esp, 0x10
test eax, eax
jne 0x45dcfb
push 0xffffeeee
call sub.KERNEL32.dll_GetLastError
push eax
push 0x5ee9f2
push 0x5ee9ed
mov eax, dword [ebp + 0x20]
push eax
call fcn.0045a3d0
add esp, 0x14
test ebx, ebx
je 0x45dcf0
call sub.KERNEL32.dll_GetLastError
push eax
push 0x5eea03
push ebx
call fcn.004d75f8
add esp, 0xc
mov word [ebp - 0x14], 0
jmp 0x45e015
push 0xffffeeee
push 0xffffeeee
push 0x5eea14
push 0x5eea0f
mov edx, dword [ebp + 0x20]
push edx
call fcn.0045a3d0
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.0045e164
add esp, 0xc
test eax, eax
jne 0x45dd6f
push 0xffffeeee
call sub.KERNEL32.dll_GetLastError
push eax
push 0x5eea29
push 0x5eea24
mov ecx, dword [ebp + 0x20]
push ecx
call fcn.0045a3d0
add esp, 0x14
test ebx, ebx
je 0x45dd6f
call sub.KERNEL32.dll_GetLastError
push eax
push 0x5eea3d
push ebx
call fcn.004d75f8
add esp, 0xc
push 0xffffeeee
push 0xffffeeee
push 0x5eea4e
push 0x5eea49
mov eax, dword [ebp + 0x20]
push eax
call fcn.0045a3d0
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.0045e60c
add esp, 0xc
test eax, eax
jne 0x45dde3
push 0xffffeeee
call sub.KERNEL32.dll_GetLastError
push eax
push 0x5eea61
push 0x5eea5c
mov edx, dword [ebp + 0x20]
push edx
call fcn.0045a3d0
add esp, 0x14
test ebx, ebx
je 0x45dde3
call sub.KERNEL32.dll_GetLastError
push eax
push 0x5eea73
push ebx
call fcn.004d75f8
add esp, 0xc
lea ecx, [ebp - 0x54]
lea eax, [ebp - 0x568]
push ecx
push eax
mov edx, dword [ebp - 0x38]
push edx
call fcn.00448030
add esp, 0xc
test eax, eax
jne 0x45de1f
push 0xffffeeee
call sub.KERNEL32.dll_GetLastError
push eax
push 0x5eea84
push 0x5eea7f
mov ecx, dword [ebp + 0x20]
push ecx
call fcn.0045a3d0
add esp, 0x14
push 0xffffeeee
push 0xffffeeee
push 0x5eea9b
push 0x5eea96
mov eax, dword [ebp + 0x20]
push eax
call fcn.0045a3d0
add esp, 0x14
lea edx, [ebp - 0x50]
lea ecx, [ebp - 0x38]
push 0
push edx
push ecx
push edi
call fcn.00447d84
add esp, 0x10
test eax, eax
je 0x45de77
push 0xffffeeee
call sub.KERNEL32.dll_GetLastError
push eax
push 0x5eeab0
push 0x5eeaab
mov eax, dword [ebp + 0x20]
push eax
call fcn.0045a3d0
add esp, 0x14
push 0xffffeeee
push 0xffffeeee
push 0x5eeac9
push 0x5eeac4
mov edx, dword [ebp + 0x20]
push edx
call fcn.0045a3d0
add esp, 0x14
push 1
mov ecx, dword [ebp - 0x38]
push ecx
lea eax, [ebp - 0x58]
push eax
call fcn.0045a968
add esp, 0xc
test eax, eax
je 0x45ded7
push 0xffffeeee
call sub.KERNEL32.dll_GetLastError
push eax
push 0x5eeada
push 0x5eead5
mov edx, dword [ebp + 0x20]
push edx
call fcn.0045a3d0
add esp, 0x14
or dword [ebp - 0x34], 0x400
jmp 0x45defd
xor ecx, ecx
mov dword [ebp - 0x58], ecx
push 0xffffeeee
call sub.KERNEL32.dll_GetLastError
push eax
push 0x5eeaf3
push 0x5eeaee
mov eax, dword [ebp + 0x20]
push eax
call fcn.0045a3d0
add esp, 0x14
mov edx, dword [ebp - 0x38]
test edx, edx
je 0x45df0d
mov ecx, dword [ebp - 0x38]
push ecx
call sub.ADVAPI32.dll_ImpersonateLoggedOnUser
push 0xffffeeee
call sub.KERNEL32.dll_GetLastError
push eax
push 0x5eeb14
push 0x5eeb0f
mov eax, dword [ebp + 0x20]
push eax
call fcn.0045a3d0
add esp, 0x14
push 0x5eeb23
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.0045a5f8
add esp, 0x1c
test eax, eax
jne 0x45dfa2
mov eax, dword [ebp - 0x38]
test eax, eax
je 0x45df61
call sub.ADVAPI32.dll_RevertToSelf
push 0xffffeeee
call sub.KERNEL32.dll_GetLastError
push eax
push 0x5eeb38
push 0x5eeb33
mov edx, dword [ebp + 0x20]
push edx
call fcn.0045a3d0
add esp, 0x14
test ebx, ebx
je 0x45df9a
call sub.KERNEL32.dll_GetLastError
push eax
push 0x5eeb4b
push ebx
call fcn.004d75f8
add esp, 0xc
mov word [ebp - 0x14], 0
jmp 0x45e015
mov ecx, dword [ebp - 0x38]
test ecx, ecx
je 0x45dfae
call sub.ADVAPI32.dll_RevertToSelf
mov dword [ebp - 0x60], 1
test ebx, ebx
je 0x45dfcd
call sub.KERNEL32.dll_GetLastError
push eax
push 0x5eeb57
push ebx
call fcn.004d75f8
add esp, 0xc
push 0xffffeeee
call sub.KERNEL32.dll_GetLastError
push eax
push 0x5eeb68
push 0x5eeb63
mov eax, dword [ebp + 0x20]
push eax
call fcn.0045a3d0
add esp, 0x14
mov word [ebp - 0x14], 0
jmp 0x45e015
push 0xffffeeee
call sub.KERNEL32.dll_GetLastError
push eax
push 0x5eeb83
push 0x5eeb7e
mov ecx, dword [ebp + 0x20]
push ecx
call fcn.0045a3d0
add esp, 0x14
mov word [ebp - 0x14], 0x14
push 0xffffeeee
push 0xffffeeee
push 0x5eeb90
push 0x5eeb8b
mov eax, dword [ebp + 0x20]
push eax
call fcn.0045a3d0
add esp, 0x14
mov edx, dword [ebp - 0x58]
test edx, edx
je 0x45e06d
lea ecx, [ebp - 0x58]
push ecx
call fcn.0045a9c0
pop ecx
push 0xffffeeee
push 0xffffeeee
push 0x5eeba0
push 0x5eeb9b
mov eax, dword [ebp + 0x20]
push eax
call fcn.0045a3d0
add esp, 0x14
mov edx, dword [ebp - 0x48]
test edx, edx
je 0x45e09d
mov ecx, dword [ebp - 0x48]
push ecx
call sub.USER32.dll_SetProcessWindowStation
mov eax, dword [ebp - 0x44]
test eax, eax
je 0x45e0ad
mov edx, dword [ebp - 0x44]
push edx
call sub.USER32.dll_CloseWindowStation
mov ecx, dword [ebp - 0x40]
test ecx, ecx
je 0x45e0bd
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.00447da8
add esp, 0xc
mov eax, dword [ebp - 0x38]
test eax, eax
je 0x45e0df
mov edx, dword [ebp - 0x38]
push edx
call sub.KERNEL32.dll_CloseHandle
mov ecx, dword [ebp - 0x3c]
test ecx, ecx
je 0x45e0ef
mov eax, dword [ebp - 0x3c]
push eax
call sub.KERNEL32.dll_CloseHandle
mov word [ebp - 0x14], 0
jmp 0x45e116
push 0xffffeeee
push 0xffffeeee
push 0x5eebbd
push 0x5eebb8
mov ecx, dword [ebp + 0x20]
push ecx
call fcn.0045a3d0
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