Function at 0x41f79f
Capabilities:
Acquire debug privileges
Create thread
Terminate thread

Disassembly:
push ebp
lea ebp, [esp - 0x1d8]
sub esp, 0x258
mov eax, dword [0x4b7f60]
xor eax, ebp
mov dword [ebp + 0x1d4], eax
mov eax, dword [ebp + 0x1e0]
push ebx
xor ebx, ebx
push esi
push edi
mov dword [ebp - 0x70], eax
cmp dword [0x4c5c80], ebx
jne 0x41f829
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
xor edi, edi
cmp dword [0x4c5c78], ebx
jne 0x41f80a
push str.ntdll.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov edi, eax
cmp edi, ebx
je 0x41f8b7
push str.ZwQueryInformationFile
push edi
call esi
mov dword [0x4c5c78], eax
cmp eax, ebx
je 0x41f8b7
push str.NtQuerySystemInformation
push edi
call esi
mov dword [0x4c5c7c], eax
cmp eax, ebx
je 0x41f8b7
mov dword [0x4c5c80], 1
push ebx
push ebx
push 3
push ebx
push ebx
push closesocket
push 0x4a93fc
mov dword [ebp - 0x64], ebx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x5c], eax
mov byte [ebp - 0x55], bl
cmp eax, 0xffffffff
je 0x41fb35
or dword [ebp - 0x60], 0xffffffff
mov esi, 0x1000
push 4
push 0x1000
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov edi, eax
mov dword [ebp - 0x6c], edi
cmp edi, ebx
je 0x41f8a4
push ebx
push esi
push edi
push 0x10
call dword [0x4c5c7c]
cmp eax, ebx
mov dword [ebp - 0x60], eax
jge 0x41f8be
push 0x8000
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_VirtualFree]
add esi, esi
cmp esi, 0x4000000
ja 0x41f8a4
cmp dword [ebp - 0x60], 0xc0000004
je 0x41f85a
cmp dword [ebp - 0x60], ebx
jge 0x41f8be
push dword [ebp - 0x5c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x41fb35
xor eax, eax
jmp 0x41fb38
xor esi, esi
cmp dword [edi], ebx
jbe 0x41f8f8
lea eax, [edi + 4]
mov dword [ebp - 0x54], eax
mov eax, dword [ebp - 0x54]
movzx eax, word [eax + 6]
cmp eax, dword [ebp - 0x5c]
jne 0x41f8e3
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov ecx, dword [ebp - 0x54]
cmp dword [ecx], eax
je 0x41f8ee
add dword [ebp - 0x54], 0x10
inc esi
cmp esi, dword [edi]
jb 0x41f8ca
jmp 0x41f8f8
shl esi, 4
mov al, byte [esi + edi + 8]
mov byte [ebp - 0x55], al
push dword [ebp - 0x5c]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
lea eax, [ebp - 0x68]
push eax
push 0x28
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x41f96e
mov eax, dword [ebp - 0x68]
mov dword [ebp - 0x5c], eax
lea eax, [ebp - 0x7c]
push eax
push str.SeDebugPrivilege
push ebx
mov dword [ebp - 0x80], 1
mov dword [ebp - 0x74], 2
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
test eax, eax
je 0x41f969
push 0x10
pop eax
lea ecx, [ebp - 0x64]
push ecx
lea ecx, [ebp - 0x44]
push ecx
push eax
mov dword [ebp - 0x64], eax
lea eax, [ebp - 0x80]
push eax
push ebx
push dword [ebp - 0x5c]
call dword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
test eax, eax
je 0x41f969
call dword [sym.imp.KERNEL32.dll_GetLastError]
push dword [ebp - 0x68]
call esi
mov dword [ebp - 0x68], ebx
cmp dword [edi], ebx
jbe 0x41fb2e
lea eax, [edi + 0xa]
mov dword [ebp - 0x60], eax
mov cl, byte [ebp - 0x55]
cmp byte [eax - 2], cl
jne 0x41fb17
push dword [eax - 6]
push ebx
push 0x40
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov dword [ebp - 0x64], eax
cmp eax, ebx
je 0x41fb17
push 2
push ebx
push ebx
lea eax, [ebp - 0x54]
push eax
mov dword [ebp - 0x54], ebx
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
mov eax, dword [ebp - 0x60]
movzx eax, word [eax]
push eax
push dword [ebp - 0x64]
call dword [sym.imp.KERNEL32.dll_DuplicateHandle]
test eax, eax
je 0x41fb17
push 0x214
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
push ebx
push ebx
mov edi, eax
mov eax, dword [ebp - 0x54]
push edi
push 0x41f66c
push ebx
push ebx
mov dword [edi], eax
call dword [sym.imp.KERNEL32.dll_CreateThread]
push 0x3e8
push eax
mov dword [ebp - 0x5c], eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
jne 0x41fa35
push 2
push dword [ebp - 0x5c]
call dword [sym.imp.KERNEL32.dll_TerminateThread]
push dword [ebp - 0x5c]
call esi
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
push dword [ebp - 0x54]
call esi
jmp 0x41fb14
push dword [ebp - 0x5c]
call esi
cmp dword [edi + 0x210], ebx
jge 0x41fa5b
push dword [ebp - 0x54]
call esi
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x41fb14
xor eax, eax
push 0x206
mov word [ebp - 0x34], ax
lea eax, [ebp - 0x32]
push ebx
push eax
call fcn.0046d720
mov ebx, dword [ebp - 0x54]
lea eax, [ebp - 0x34]
push eax
call fcn.0041f6c1
add esp, 0x10
test eax, eax
jne 0x41fa99
push edi
push eax
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
push dword [ebp - 0x54]
call esi
jmp 0x41fb12
lea eax, [ebp - 0x34]
push eax
lea ecx, [ebp - 0x50]
call fcn.004018ba
add edi, 0xa
push edi
lea ecx, [ebp - 0x50]
call fcn.00401941
cmp dword [ebp - 0x38], 8
mov eax, dword [ebp - 0x4c]
jae 0x41fabd
lea eax, [ebp - 0x4c]
push dword [ebp - 0x70]
push eax
call fcn.00470da7
pop ecx
pop ecx
test eax, eax
jne 0x41fb06
push dword [ebp - 0x70]
lea ecx, [ebp - 0x50]
call fcn.004019f8
push dword [ebp - 0x54]
call esi
push 3
push 0
push 0
lea eax, [ebp - 0x54]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
mov eax, dword [ebp - 0x60]
movzx eax, word [eax]
push eax
push dword [ebp - 0x64]
call dword [sym.imp.KERNEL32.dll_DuplicateHandle]
test eax, eax
je 0x41fb06
push dword [ebp - 0x54]
call esi
push 0
push 1
lea ecx, [ebp - 0x50]
call fcn.00401a1c
xor ebx, ebx
mov edi, dword [ebp - 0x6c]
inc dword [ebp - 0x68]
mov eax, dword [ebp - 0x60]
mov ecx, dword [ebp - 0x68]
add eax, 0x10
mov dword [ebp - 0x60], eax
cmp ecx, dword [edi]
jb 0x41f97f
mov dword [ebp - 0x64], 1
mov eax, dword [ebp - 0x64]
mov ecx, dword [ebp + 0x1d4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0046d79a
add ebp, 0x1d8
leave
ret