Function at 0x40419a
Capabilities:
Acquire debug privileges
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4170c1
mov eax, dword fs:[0]
push eax
mov eax, 0x1027c
call fcn.00406610
mov eax, dword [0x41d190]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, dword [ebp + 8]
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x10270], edi
mov dword [ebp - 0x10284], eax
cmp edi, 4
jne 0x4041f7
push dword [ebp + 0x10]
push eax
push str._SystemRoot_System32_ntoskrnl.exe
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
xor eax, eax
inc eax
jmp 0x40423e
mov esi, 0x41e4f0
mov ecx, esi
mov dword [ebp - 0x10280], esi
call fcn.00405d71
xor ebx, ebx
mov dword [ebp - 4], ebx
cmp dword [0x41e4ec], ebx
jne 0x40426d
push str.SeDebugPrivilege
call fcn.00405c14
mov dword [esp], str.ntdll.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
cmp eax, ebx
jne 0x404258
or dword [ebp - 4], 0xffffffff
mov ecx, esi
call fcn.00405d79
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004062fc
leave
ret
push str.NtQueryInformationProcess
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x41e4ec], eax
cmp eax, ebx
je 0x404231
or dword [ebp - 4], 0xffffffff
mov ecx, esi
call fcn.00405d79
push edi
push ebx
push 0x410
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov esi, eax
mov dword [ebp - 0x1026c], esi
cmp esi, 0xffffffff
je 0x40423c
cmp esi, ebx
je 0x40423c
mov dword [ebp - 0x10288], esi
xor eax, eax
inc eax
push 0x10018
mov dword [ebp - 4], eax
mov dword [ebp - 0x10280], eax
lea eax, [ebp - 0x10044]
push ebx
push eax
mov dword [ebp - 0x1027c], ebx
mov dword [ebp - 0x10048], ebx
call fcn.00406310
xor eax, eax
mov byte [ebp - 0x10268], bl
lea edi, [ebp - 0x10267]
push 0x1d6
stosb byte es:[edi], al
lea eax, [ebp - 0x10266]
push ebx
push eax
call fcn.00406310
xor eax, eax
mov byte [ebp - 0x2c], bl
lea edi, [ebp - 0x2b]
stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
xor eax, eax
lea edi, [ebp - 0x24]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
xor eax, eax
mov byte [ebp - 0x10090], bl
lea edi, [ebp - 0x1008f]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosw word es:[edi], ax
push 0x38
stosb byte es:[edi], al
lea eax, [ebp - 0x10080]
push ebx
push eax
call fcn.00406310
push 0x1001c
lea eax, [ebp - 0x10048]
push ebx
push eax
call fcn.00406310
push 0x1d8
lea eax, [ebp - 0x10268]
push ebx
push eax
call fcn.00406310
push 0x1c
lea eax, [ebp - 0x2c]
push ebx
push eax
call fcn.00406310
add esp, 0x48
push 0x48
lea eax, [ebp - 0x10090]
push ebx
push eax
call fcn.00406310
mov eax, dword [ebp - 0x10270]
add esp, 0xc
mov dword [ebp - 0x10048], eax
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov edi, dword [sym.imp.KERNEL32.dll_HeapAlloc]
push 0x18
push 8
push eax
mov dword [ebp - 0x10274], eax
call edi
mov dword [ebp - 0x10270], eax
cmp eax, ebx
jne 0x4043a0
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x40423c
lea ecx, [ebp - 0x1027c]
push ecx
push 0x18
push eax
push ebx
push esi
call dword [0x41e4ec]
mov esi, dword [sym.imp.KERNEL32.dll_HeapFree]
cmp eax, ebx
jl 0x404415
cmp dword [ebp - 0x1027c], 0x18
jbe 0x404411
push dword [ebp - 0x10270]
push ebx
push dword [ebp - 0x10274]
call esi
push dword [ebp - 0x1027c]
push 8
push dword [ebp - 0x10274]
call edi
mov dword [ebp - 0x10270], eax
cmp eax, ebx
jne 0x4043f6
push dword [ebp - 0x1026c]
jmp 0x404395
lea ecx, [ebp - 0x1027c]
push ecx
push dword [ebp - 0x1027c]
push eax
push ebx
push dword [ebp - 0x1026c]
call dword [0x41e4ec]
cmp eax, ebx
jge 0x404426
push dword [ebp - 0x10270]
push ebx
push dword [ebp - 0x10274]
call esi
jmp 0x4043ee
mov eax, dword [ebp - 0x10270]
cmp dword [eax + 4], ebx
jne 0x404434
push eax
jmp 0x40441b
lea ecx, [ebp - 0x10278]
push ecx
push 0x1d8
lea ecx, [ebp - 0x10268]
push ecx
mov dword [ebp - 0x10278], ebx
push dword [eax + 4]
push dword [ebp - 0x1026c]
call dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
test eax, eax
je 0x404528
lea eax, [ebp - 0x10278]
push eax
push 0x48
lea eax, [ebp - 0x10090]
push eax
push dword [ebp - 0x10258]
mov dword [ebp - 0x10278], ebx
push dword [ebp - 0x1026c]
call dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
test eax, eax
je 0x404528
cmp word [ebp - 0x10050], bx
jbe 0x404528
movzx eax, word [ebp - 0x10050]
push eax
push 8
push dword [ebp - 0x10274]
call edi
mov edi, eax
cmp edi, ebx
je 0x404522
lea eax, [ebp - 0x10278]
push eax
movzx eax, word [ebp - 0x10050]
push eax
push edi
push dword [ebp - 0x1004c]
mov dword [ebp - 0x10278], ebx
push dword [ebp - 0x1026c]
call dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
test eax, eax
je 0x404516
mov eax, 0x7fff
cmp word [ebp - 0x10050], ax
mov eax, 0x7ffe
jae 0x4044ff
movzx eax, word [ebp - 0x10050]
push ebx
push ebx
push dword [ebp + 0x10]
shr eax, 1
push dword [ebp - 0x10284]
push eax
push edi
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
push edi
push ebx
push dword [ebp - 0x10274]
call esi
jmp 0x404528
mov dword [ebp - 0x10280], ebx
push dword [ebp - 0x10270]
push ebx
push dword [ebp - 0x10274]
call esi
push dword [ebp - 0x1026c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x10280]
jmp 0x40423e