Function at 0x516060
Capabilities:
Inject apc
Resume thread

Disassembly:
sub esp, 0x54
push ebx
mov ebx, dword [esp + 0x5c]
mov eax, edx
push ebp
mov dword [esp + 0x28], eax
xor ebp, ebp
push esi
mov eax, dword [eax]
add eax, 2
mov dword [esp + 0xc], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x20], 0
mov dword [esp + 0x28], 0
mov dword [esp + 0x24], 0
mov dword [esp + 0x18], ebp
mov dword [esp + 0x1c], eax
push edi
mov edi, ecx
test ebx, ebx
je 0x5160bf
mov eax, dword [ebx]
add eax, 2
mov dword [esp + 0x18], eax
push 0
lea eax, [esp + 0x28]
push eax
push 0
push str.RtlExitUserThread
push 0x6309f4
push edi
call sym.SystemInformer.exe_Ordinal_1525
mov esi, eax
test esi, esi
js 0x516299
push 0
lea eax, [esp + 0x30]
push eax
push 0
push str.SetEnvironmentVariableW
push 0x6309fc
push edi
lfence
call sym.SystemInformer.exe_Ordinal_1525
mov esi, eax
test esi, esi
js 0x516299
push 4
push 0x1000
lea eax, [esp + 0x28]
push eax
push 0
lea eax, [esp + 0x20]
push eax
push edi
lfence
call dword [sym.imp.ntdll.dll_NtAllocateVirtualMemory]
mov esi, eax
test esi, esi
js 0x516299
mov eax, dword [esp + 0x30]
push 0
lfence
push dword [eax]
push dword [eax + 4]
push dword [esp + 0x1c]
push edi
call dword [sym.imp.ntdll.dll_NtWriteVirtualMemory]
mov esi, eax
test esi, esi
js 0x516299
test ebx, ebx
je 0x5161a8
push 4
push 0x1000
lea eax, [esp + 0x20]
push eax
push 0
lea eax, [esp + 0x24]
push eax
push edi
lfence
call dword [sym.imp.ntdll.dll_NtAllocateVirtualMemory]
mov esi, eax
test esi, esi
js 0x516299
push 0
lfence
push dword [ebx]
push dword [ebx + 4]
push dword [esp + 0x20]
push edi
call dword [sym.imp.ntdll.dll_NtWriteVirtualMemory]
mov esi, eax
test esi, esi
js 0x516299
cmp dword [0x62db64], 0x3e
jb 0x5161cd
lea edx, [esp + 0x1c]
mov ecx, edi
lfence
call fcn.0051de60
mov ebp, dword [esp + 0x1c]
mov esi, eax
test esi, esi
js 0x51625a
push 0
lea eax, [esp + 0x2c]
push eax
push 0
lfence
push dword [esp + 0x30]
push 0
push 0
push ecx
push 1
mov ecx, edi
call fcn.004fe820
mov ebx, dword [esp + 0x28]
mov esi, eax
test esi, esi
js 0x51624f
push 0
push dword [esp + 0x18]
push dword [esp + 0x18]
push dword [esp + 0x38]
push ebx
call dword [sym.imp.ntdll.dll_NtQueueApcThread]
mov esi, eax
test esi, esi
js 0x51624f
push 0
push ebx
call dword [sym.imp.ntdll.dll_NtResumeThread]
mov esi, eax
test esi, esi
js 0x51624f
push dword [esp + 0x6c]
push 0
push ebx
call dword [sym.imp.ntdll.dll_NtWaitForSingleObject]
mov esi, eax
test esi, esi
js 0x51624f
push 0
push 0x1c
lea eax, [esp + 0x4c]
push eax
push 0
push ebx
call dword [sym.imp.ntdll.dll_NtQueryInformationThread]
mov esi, eax
test esi, esi
cmovns esi, dword [esp + 0x44]
test ebx, ebx
je 0x51625a
push ebx
call dword [sym.imp.ntdll.dll_NtClose]
test ebp, ebp
je 0x516299
push 0
push 0
push 0x10
lea eax, [esp + 0x40]
xorps xmm0, xmm0
movups xmmword [esp + 0x40], xmm0
push eax
push 0x2c
mov dword [esp + 0x48], ebp
mov dword [esp + 0x4c], 3
mov byte [esp + 0x50], 0
mov dword [esp + 0x54], 0
call dword [sym.imp.ntdll.dll_NtPowerInformation]
push ebp
call dword [sym.imp.ntdll.dll_NtClose]
cmp dword ds:[esp + 0x10], 0
je 0x5162c6
push 0x8000
lea eax, [esp + 0x24]
mov dword [esp + 0x24], 0
push eax
lea eax, [esp + 0x18]
push eax
push edi
call dword [sym.imp.ntdll.dll_NtFreeVirtualMemory]
cmp dword [esp + 0x14], 0
je 0x5162eb
push 0x8000
lea eax, [esp + 0x1c]
mov dword [esp + 0x1c], 0
push eax
lea eax, [esp + 0x1c]
push eax
push edi
call dword [sym.imp.ntdll.dll_NtFreeVirtualMemory]
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
add esp, 0x54
ret 8