Function at 0x41d990
Capabilities:
Resume thread

Disassembly:
push ebp
lea ebp, [esp - 0x44]
sub esp, 0x44
push 0xffffffffffffffff
push 0x4c11d8
mov eax, dword fs:[0]
push eax
sub esp, 0x128
push ebx
push esi
push edi
mov eax, dword [0x57e030]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov eax, dword [ebp + 0x4c]
push eax
lea ecx, [ebp - 0x54]
push ecx
call fcn.0041f030
mov dword [ebp - 4], 0
mov edx, dword [ebp - 0x50]
push edx
call dword [sym.imp.KERNEL32.dll_ResumeThread]
cmp eax, 0xffffffff
setne al
mov byte [ebp - 0x48], al
mov eax, dword [ebp - 0x1c]
test eax, eax
je 0x41d9fa
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp byte [ebp - 0x40], 0
jne 0x41dada
lea ecx, [ebp + 0x1c]
call fcn.00404990
lea ecx, [ebp]
mov byte [ebp - 4], 1
call fcn.00404990
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x2c]
mov esi, eax
cmp eax, dword [ebp - 0x28]
jbe 0x41da2b
call fcn.00480e22
mov eax, dword [ebp - 0x38]
test eax, eax
jne 0x41dacb
call fcn.00480e22
xor eax, eax
cmp esi, dword [eax + 0x10]
jb 0x41da47
call fcn.00480e22
mov edx, dword [ebp + 0x1c]
mov eax, dword [edx + 4]
push esi
lea ecx, [ebp + 0x1c]
call eax
mov eax, dword [ebp + 0x2c]
mov esi, eax
cmp eax, dword [ebp + 0x30]
jbe 0x41da62
call fcn.00480e22
mov eax, dword [ebp + 0x20]
test eax, eax
jne 0x41dad2
call fcn.00480e22
xor eax, eax
cmp esi, dword [eax + 0x10]
jb 0x41da7a
call fcn.00480e22
push esi
lea ecx, [ebp]
push str.Cant_impersonate_thread_by_pipe_handle:__s
push ecx
call fcn.004056a0
mov eax, dword [ebp + 0x10]
add esp, 0xc
mov esi, eax
cmp eax, dword [ebp + 0x14]
jbe 0x41da9b
call fcn.00480e22
mov eax, dword [ebp + 4]
test eax, eax
jne 0x41dad6
call fcn.00480e22
xor eax, eax
cmp esi, dword [eax + 0x10]
jb 0x41dab3
call fcn.00480e22
push esi
lea edx, [ebp - 0x74]
push edx
call fcn.004048f0
push 0x56e6e0
lea eax, [ebp - 0x74]
push eax
call fcn.004841dc
mov eax, dword [eax]
jmp 0x41da3d
mov eax, dword [eax]
jmp 0x41da70
mov eax, dword [eax]
jmp 0x41daa9
mov ecx, dword [ebp - 0x4c]
push ecx
push 0
push 0x40
call dword [sym.imp.KERNEL32.dll_OpenThread]
mov edi, eax
mov dword [ebp + 0x3c], edi
test edi, edi
jne 0x41db13
push str.Cant_open_thread_to_duplicate_impersonate_token
lea edx, [ebp - 0x134]
push edx
call fcn.00419ba0
push 0x56e788
lea eax, [ebp - 0x134]
push eax
call fcn.004841dc
lea ecx, [ebp + 0x40]
push ecx
push 1
push 0xf01ff
push edi
mov byte [ebp - 4], 3
call dword [sym.imp.ADVAPI32.dll_OpenThreadToken]
test eax, eax
jne 0x41db4f
push str.Cant_open_process_token_to_duplicate_impersonate_token
lea edx, [ebp - 0xb4]
push edx
call fcn.00419ba0
push 0x56e788
lea eax, [ebp - 0xb4]
push eax
call fcn.004841dc
lea ecx, [ebp + 0x38]
push ecx
push 1
push 2
push 0
mov byte [ebp - 4], 4
mov edx, dword [ebp + 0x40]
push 0
push edx
call dword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
test eax, eax
jne 0x41dbb5
push str.Cant_duplicate_token_from_impersonated_to_a_named_pipe_client_token
lea eax, [ebp - 0xf4]
push eax
call fcn.00419ba0
push 0x56e788
lea ecx, [ebp - 0xf4]
push ecx
call fcn.004841dc
mov edx, dword [ebp + 0x40]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0
push 0
call fcn.004841dc
mov eax, dword [ebp + 0x3c]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0
push 0
call fcn.004841dc
mov eax, dword [0x580b94]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp eax, 0xffffffff
je 0x41dbc8
push eax
call esi
mov edx, dword [ebp + 0x40]
mov ecx, dword [ebp + 0x38]
push edx
mov dword [0x580b94], ecx
call esi
push edi
call esi
lea ecx, [ebp - 0x54]
mov dword [ebp - 4], 0xffffffff
call fcn.0041f0f0
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
add ebp, 0x44
mov esp, ebp
pop ebp
ret