Function at 0x513ae0
Capabilities:
Inject apc
Resume thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x54
xor eax, eax
mov dword [ebp - 0x28], edx
push ebx
mov ebx, dword [ebp + 8]
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x10], eax
mov eax, dword [edx]
push esi
add eax, 2
mov dword [ebp - 4], 0
mov dword [ebp - 8], 0
mov dword [ebp - 0xc], 0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x18], eax
push edi
mov edi, ecx
test ebx, ebx
je 0x513b37
mov eax, dword [ebx]
add eax, 2
mov dword [ebp - 0xc], eax
push 0
lea eax, [ebp - 0x1c]
push eax
push 0
push str.RtlExitUserThread
push 0x630e34
push edi
call sym.SystemInformer.exe_PhGetProcedureAddressRemote
mov esi, eax
test esi, esi
js 0x513cf0
push 0
lea eax, [ebp - 0x24]
push eax
push 0
push str.SetEnvironmentVariableW
push 0x630e3c
push edi
lfence
call sym.SystemInformer.exe_PhGetProcedureAddressRemote
mov esi, eax
test esi, esi
js 0x513cf0
push 4
push 0x1000
lea eax, [ebp - 0x18]
push eax
push 0
lea eax, [ebp - 4]
push eax
push edi
lfence
call dword [sym.imp.ntdll.dll_NtAllocateVirtualMemory]
mov esi, eax
test esi, esi
js 0x513cf0
mov eax, dword [ebp - 0x28]
push 0
lfence
push dword [eax]
push dword [eax + 4]
push dword [ebp - 4]
push edi
call dword [sym.imp.ntdll.dll_NtWriteVirtualMemory]
mov esi, eax
test esi, esi
js 0x513cf0
test ebx, ebx
je 0x513c10
push 4
push 0x1000
lea eax, [ebp - 0xc]
push eax
push 0
lea eax, [ebp - 8]
push eax
push edi
lfence
call dword [sym.imp.ntdll.dll_NtAllocateVirtualMemory]
mov esi, eax
test esi, esi
js 0x513cf0
push 0
lfence
push dword [ebx]
push dword [ebx + 4]
push dword [ebp - 8]
push edi
call dword [sym.imp.ntdll.dll_NtWriteVirtualMemory]
mov esi, eax
test esi, esi
js 0x513cf0
cmp dword [0x62dbb0], 0x3e
jb 0x513c36
lea edx, [ebp - 0x10]
mov ecx, edi
lfence
call fcn.0051d8e0
mov esi, eax
test esi, esi
js 0x513d3d
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x14], eax
push 0
lea eax, [ebp - 0x20]
push eax
push 0
lfence
push dword [ebp - 0x1c]
push 0
push 0
push ecx
push 1
mov ecx, edi
call fcn.004fc5c0
mov ebx, dword [ebp - 0x20]
mov esi, eax
test esi, esi
js 0x513caf
push 0
push dword [ebp - 8]
push dword [ebp - 4]
push dword [ebp - 0x24]
push ebx
call dword [sym.imp.ntdll.dll_NtQueueApcThread]
mov esi, eax
test esi, esi
js 0x513caf
push 0
push ebx
call dword [sym.imp.ntdll.dll_NtResumeThread]
mov esi, eax
test esi, esi
js 0x513caf
push dword [ebp + 0xc]
push 0
push ebx
call dword [sym.imp.ntdll.dll_NtWaitForSingleObject]
mov esi, eax
test esi, esi
js 0x513caf
push 0
push 0x1c
lea eax, [ebp - 0x54]
push eax
push 0
push ebx
call dword [sym.imp.ntdll.dll_NtQueryInformationThread]
mov esi, eax
test esi, esi
cmovns esi, dword [ebp - 0x54]
test ebx, ebx
je 0x513cba
push ebx
call dword [sym.imp.ntdll.dll_NtClose]
mov ebx, dword [ebp - 0x14]
lea ecx, [ecx]
test ebx, ebx
je 0x513cf0
xor eax, eax
mov dword [ebp - 0x38], ebx
push eax
push eax
mov dword [ebp - 0x30], eax
mov byte [ebp - 0x30], al
mov dword [ebp - 0x2c], eax
lea eax, [ebp - 0x38]
push 0x10
push eax
push 0x2c
mov dword [ebp - 0x34], 3
call dword [sym.imp.ntdll.dll_NtPowerInformation]
push ebx
call dword [sym.imp.ntdll.dll_NtClose]
cmp dword [ebp - 4], 0
je 0x513d11
push 0x8000
lea eax, [ebp - 0x18]
mov dword [ebp - 0x18], 0
push eax
lea eax, [ebp - 4]
push eax
push edi
call dword [sym.imp.ntdll.dll_NtFreeVirtualMemory]
cmp dword [ebp - 8], 0
je 0x513d32
push 0x8000
lea eax, [ebp - 0xc]
mov dword [ebp - 0xc], 0
push eax
lea eax, [ebp - 8]
push eax
push edi
call dword [sym.imp.ntdll.dll_NtFreeVirtualMemory]
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov ebx, dword [ebp - 0x10]
jmp 0x513cbd