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

Disassembly:
sub esp, 0x248
push ebx
push esi
push edi
xor ebx, ebx
mov ecx, 0x49
xor eax, eax
lea edi, [esp + 0x2c]
mov dword [esp + 0x28], ebx
rep stosd dword es:[edi], eax
mov ecx, 0x40
lea edi, [esp + 0x151]
mov byte [esp + 0x150], al
push 1
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push str.SeDebugPrivilege
mov dword [esp + 0x18], ebx
stosb byte es:[edi], al
call fcn.0040d6d0
mov esi, dword [sym.imp.KERNEL32.dll_LoadLibraryA]
add esp, 8
push str.CreateToolhelp32Snapshot
push str.KERNEL32.dll
call esi
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call edi
push ebx
push 2
call eax
cmp eax, 0xffffffff
mov dword [esp + 0xc], eax
jne 0x40d4bc
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x248
ret
push ebp
push str.LocalAlloc
push str.KERNEL32.dll
mov dword [esp + 0x34], 0x128
call esi
push eax
call edi
push 0x400
push 0x40
call eax
mov ebp, eax
push str.Process32First
push str.KERNEL32.dll
mov ebx, 1
mov byte [ebp], 0x7f
call esi
push eax
call edi
mov edx, dword [esp + 0x10]
lea ecx, [esp + 0x2c]
push ecx
push edx
call eax
test eax, eax
je 0x40d677
push str.LocalReAlloc
push str.KERNEL32.dll
call esi
push eax
call edi
push str.LocalSize
push str.KERNEL32.dll
mov dword [esp + 0x20], eax
call esi
push eax
call edi
push str.Process32Next
push str.KERNEL32.dll
mov dword [esp + 0x2c], eax
call esi
push eax
call edi
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x34]
push eax
push 0
push 0x410
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov ecx, dword [esp + 0x34]
mov dword [esp + 0x20], eax
test ecx, ecx
je 0x40d661
cmp ecx, 4
je 0x40d661
cmp ecx, 8
je 0x40d661
lea ecx, [esp + 0x28]
lea edx, [esp + 0x14]
push ecx
push 4
push edx
push eax
call fcn.0041f058
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x20]
lea eax, [esp + 0x154]
push 0x104
push eax
push ecx
push edx
call fcn.0041f046
lea edi, [esp + 0x50]
or ecx, 0xffffffff
xor eax, eax
push ebp
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea edi, [esp + 0x158]
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea esi, [edx + ecx + 6]
add esi, ebx
call dword [esp + 0x28]
cmp eax, esi
jae 0x40d5de
push 0x42
push esi
push ebp
call dword [esp + 0x24]
mov ebp, eax
mov eax, dword [esp + 0x34]
lea edi, [esp + 0x50]
mov dword [ebx + ebp], eax
or ecx, 0xffffffff
xor eax, eax
add ebx, 4
repne scasb al, byte es:[edi]
not ecx
mov edx, ecx
lea esi, [esp + 0x50]
lea edi, [ebx + ebp]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x50]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea edi, [esp + 0x154]
lea esi, [esp + 0x154]
lea ebx, [ebx + ecx + 1]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
mov eax, ecx
lea edi, [ebx + ebp]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x154]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, dword [sym.imp.KERNEL32.dll_LoadLibraryA]
not ecx
dec ecx
lea ebx, [ebx + ecx + 1]
mov edx, dword [esp + 0x10]
lea ecx, [esp + 0x2c]
push ecx
push edx
call dword [esp + 0x24]
test eax, eax
jne 0x40d544
push str.LocalReAlloc
push str.KERNEL32.dll
call esi
push eax
call edi
push 0x42
push ebx
push ebp
call eax
push str.CloseHandle
push str.KERNEL32.dll
mov ebx, eax
call esi
push eax
call edi
push 0
push str.SeDebugPrivilege
mov esi, eax
call fcn.0040d6d0
mov eax, dword [esp + 0x18]
add esp, 8
push eax
call esi
pop ebp
pop edi
mov eax, ebx
pop esi
pop ebx
add esp, 0x248
ret