Function at 0x40be90
Capabilities:
Acquire debug privileges
Get process image filename

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x44339b
mov eax, dword fs:[0]
push eax
sub esp, 0x260
mov eax, dword [0x45e070]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, dword [ebp + 0xc]
xor edi, edi
mov eax, dword [ebp + 8]
mov dword [ebp - 0x26c], eax
test esi, esi
jne 0x40bed6
xor eax, eax
jmp 0x40c18b
lea eax, [ebp - 0x268]
xorps xmm0, xmm0
push eax
push 0x28
movups xmmword [ebp - 0x22c], xmm0
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x40bf76
lea eax, [ebp - 0x23c]
push eax
push str.SeDebugPrivilege
push 0
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
test eax, eax
je 0x40bf69
mov eax, dword [ebp - 0x23c]
mov dword [ebp - 0x248], eax
mov eax, dword [ebp - 0x238]
mov dword [ebp - 0x244], eax
lea eax, [ebp - 0x21c]
push eax
lea eax, [ebp - 0x264]
mov dword [ebp - 0x21c], edi
push eax
push 0x10
lea eax, [ebp - 0x24c]
mov dword [ebp - 0x24c], 1
push eax
push 0
push dword [ebp - 0x268]
mov dword [ebp - 0x240], 2
call dword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
push dword [ebp - 0x268]
mov eax, dword [sym.imp.KERNEL32.dll_CloseHandle]
call eax
push dword [ebp - 0x26c]
push 0
push 0x1000
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov dword [ebp - 0x268], eax
test eax, eax
je 0x40c0a7
push str.kernel32.dll
mov dword [ebp - 0x21c], 0x104
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
jne 0x40bfbf
push str.kernel32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
test eax, eax
je 0x40bfe3
push str.QueryFullProcessImageNameW
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x40bfe3
lea ecx, [ebp - 0x21c]
push ecx
push esi
push 0
push dword [ebp - 0x268]
call eax
jmp 0x40bff7
push dword [ebp - 0x21c]
push esi
push 0
push dword [ebp - 0x268]
call sub.PSAPI.DLL_GetModuleFileNameExW
mov edi, eax
test edi, edi
jne 0x40c09b
push 0x208
push eax
lea eax, [ebp - 0x218]
push eax
call fcn.00427af0
add esp, 0xc
lea eax, [ebp - 0x218]
push 0x104
push eax
push dword [ebp - 0x268]
call sub.PSAPI.DLL_GetProcessImageFileNameW
test eax, eax
je 0x40c09b
lea eax, [ebp - 0x218]
push eax
lea eax, [ebp - 0x254]
push eax
call fcn.0040c3f0
mov edi, eax
add esp, 8
cmp dword [edi + 0x14], 8
jb 0x40c051
mov edi, dword [edi]
mov edx, 0x104
mov ecx, esi
sub edi, esi
nop word [eax + eax]
lea eax, [edx + 0x7ffffefa]
test eax, eax
je 0x40c07e
movzx eax, word [edi + ecx]
test ax, ax
je 0x40c07e
mov word [ecx], ax
add ecx, 2
sub edx, 1
jne 0x40c060
lea eax, [ecx - 2]
test edx, edx
cmovne eax, ecx
xor ecx, ecx
mov word [eax], cx
lea ecx, [ebp - 0x254]
call fcn.004028a0
mov edi, 1
push dword [ebp - 0x268]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [ebp - 0x21c]
push eax
push 0x20
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x40c0e8
push 0
push 0
push 0
lea eax, [ebp - 0x264]
push eax
push 0
push dword [ebp - 0x21c]
call dword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
push dword [ebp - 0x21c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test edi, edi
jne 0x40c189
xor eax, eax
mov dword [ebp - 0x224], edi
push eax
push 0x44541c
lea ecx, [ebp - 0x234]
mov dword [ebp - 0x220], 7
mov word [ebp - 0x234], ax
call fcn.004029e0
lea eax, [ebp - 0x234]
mov dword [ebp - 4], edi
push eax
push dword [ebp - 0x26c]
call fcn.0040c1b0
mov edi, eax
add esp, 8
test edi, edi
je 0x40c17e
cmp dword [ebp - 0x220], 8
lea edx, [ebp - 0x234]
mov ecx, 0x104
cmovae edx, dword [ebp - 0x234]
sub edx, esi
lea eax, [ecx + 0x7ffffefa]
test eax, eax
je 0x40c171
movzx eax, word [edx + esi]
test ax, ax
je 0x40c171
mov word [esi], ax
add esi, 2
sub ecx, 1
jne 0x40c153
test ecx, ecx
lea eax, [esi - 2]
cmovne eax, esi
xor ecx, ecx
mov word [eax], cx
lea ecx, [ebp - 0x234]
call fcn.004028a0
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0040fcd6
mov esp, ebp
pop ebp
ret