Function at 0x405a80
Capabilities:
Acquire debug privileges
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x884
mov eax, dword [0x5bb270]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x120]
mov dword [ebp - 0x870], ecx
mov dword [ebp - 0x884], eax
push ebx
mov ebx, dword [ebp + 8]
test eax, eax
je 0x405ab3
mov dword [eax], 0
test ebx, ebx
je 0x405dd0
cmp word [ebx], 0
je 0x405dd0
push esi
push edi
push str.kernel32
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov edi, eax
push str.CreateToolhelp32Snapshot
push edi
call esi
push str.Process32FirstW
push edi
mov dword [ebp - 0x878], eax
call esi
push str.Process32NextW
push edi
mov dword [ebp - 0x864], eax
call esi
push str.Module32FirstW
push edi
mov dword [ebp - 0x87c], eax
call esi
push str.Module32NextW
push edi
mov dword [ebp - 0x880], eax
call esi
cmp dword [ebp - 0x87c], 0
mov edi, eax
je 0x405bf9
mov esi, dword [ebp - 0x864]
test esi, esi
je 0x405bf9
cmp dword [ebp - 0x880], 0
je 0x405bf9
test edi, edi
je 0x405bf9
cmp dword [ebp - 0x878], 0
je 0x405bf9
push 0x22c
lea eax, [ebp - 0x860]
mov dword [ebp - 0x874], 0
push 0
push eax
call fcn.00537c80
add esp, 0xc
mov dword [ebp - 0x860], 0x22c
cmp dword [ebp + 0x1c], 2
mov dword [ebp - 0x864], 0
jne 0x405bbf
mov eax, dword [ebp + 0x10]
cmp eax, 5
ja 0x405ba3
jne 0x405bbf
cmp dword [ebp + 0x14], 1
jb 0x405bbf
mov ecx, dword [ebp - 0x870]
push 1
push str.SeDebugPrivilege
mov dword [ebp - 0x864], 1
call fcn.00406af0
push 0
push 2
mov dword [ebp - 0x868], 0
call dword [ebp - 0x878]
mov dword [ebp - 0x86c], eax
cmp eax, 0xffffffff
jne 0x405c0e
cmp dword [ebp - 0x864], 0
je 0x405bf9
mov ecx, dword [ebp - 0x870]
push 0
push str.SeDebugPrivilege
call fcn.00406af0
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0053787e
mov esp, ebp
pop ebp
ret 0x11c
cmp dword [ebp + 0x1c], 2
jne 0x405d33
xor eax, eax
push 0x206
push eax
mov word [ebp - 0x20c], ax
lea eax, [ebp - 0x20a]
push eax
call fcn.00537c80
mov ecx, dword [ebp - 0x870]
lea eax, [ebp - 0x20c]
add esp, 0xc
push 0x104
push eax
push ebx
call fcn.00405990
lea eax, [ebp - 0x860]
push eax
push dword [ebp - 0x86c]
call esi
test eax, eax
je 0x405d6c
jmp 0x405c70
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x83c]
push eax
call fcn.005375f1
add esp, 8
test eax, eax
jne 0x405d0a
push dword [ebp - 0x858]
mov dword [ebp - 0x634], 0x428
push 8
call dword [ebp - 0x878]
mov esi, eax
cmp esi, 0xffffffff
je 0x405d0a
lea eax, [ebp - 0x634]
push eax
push esi
call dword [ebp - 0x880]
test eax, eax
je 0x405cfa
nop
lea eax, [ebp - 0x414]
push ebx
push eax
call fcn.005375f1
add esp, 8
test eax, eax
je 0x405ce4
lea eax, [ebp - 0x634]
push eax
push esi
call edi
test eax, eax
jne 0x405cc0
jmp 0x405cfa
mov eax, dword [ebp - 0x858]
mov dword [ebp - 0x868], 1
mov dword [ebp - 0x874], eax
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x868], 0
jne 0x405d25
lea eax, [ebp - 0x860]
push eax
push dword [ebp - 0x86c]
call dword [ebp - 0x87c]
test eax, eax
jne 0x405c70
mov ebx, dword [ebp - 0x868]
mov esi, dword [ebp - 0x874]
jmp 0x405d70
lea ecx, [ebp - 0x860]
push ecx
push eax
call esi
test eax, eax
je 0x405d6c
lea eax, [ebp - 0x83c]
push ebx
push eax
call fcn.005375f1
add esp, 8
test eax, eax
je 0x405dc3
lea eax, [ebp - 0x860]
push eax
push dword [ebp - 0x86c]
call dword [ebp - 0x87c]
test eax, eax
jne 0x405d41
xor ebx, ebx
xor esi, esi
push dword [ebp - 0x86c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x864], 0
je 0x405d97
mov ecx, dword [ebp - 0x870]
push 0
push str.SeDebugPrivilege
call fcn.00406af0
test ebx, ebx
je 0x405bf9
mov eax, dword [ebp - 0x884]
test eax, eax
je 0x405dab
mov dword [eax], esi
pop edi
pop esi
mov eax, 1
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0053787e
mov esp, ebp
pop ebp
ret 0x11c
mov esi, dword [ebp - 0x858]
mov ebx, 1
jmp 0x405d70
mov ecx, dword [ebp - 4]
xor eax, eax
xor ecx, ebp
pop ebx
call fcn.0053787e
mov esp, ebp
pop ebp
ret 0x11c