Function at 0x50f520
Capabilities:
Resolve function by parsing pe exports
Resume thread
Suspend thread

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x58c
mov eax, dword [0x62a040]
xor eax, esp
mov dword [esp + 0x588], eax
mov ecx, dword [ebp + 0x14]
mov eax, dword [ebp + 0xc]
mov dword [esp + 0x5c], ecx
mov ecx, dword [ebp + 0x1c]
push ebx
mov dword [esp + 0x30], ecx
xor bl, bl
mov ecx, dword [ebp + 0x20]
push esi
mov esi, dword [ebp + 0x10]
mov dword [esp + 0x30], ecx
xor cl, cl
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], 0
mov byte [esp + 0x20], 0
mov byte [esp + 0x13], 0
mov dword [esp + 0xc], ecx
push edi
mov edi, dword [ebp + 8]
mov dword [esp + 0x18], edi
test eax, eax
jne 0x50f650
mov eax, dword [0x632e50]
cmp eax, 3
jge 0x50f5cf
test esi, esi
je 0x50f5cf
push dword [esi]
lea eax, [esp + 0x20]
push 0x410
push eax
call sym.SystemInformer.exe_PhOpenProcess
mov edx, eax
mov dword [esp + 0x20], edx
test edx, edx
jns 0x50f64b
lfence
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x588]
xor ecx, esp
call fcn.0057c26f
mov esp, ebp
pop ebp
ret 0x1c
cmp eax, 5
je 0x50f5d9
cmp eax, 3
jl 0x50f5f4
lea eax, [esp + 0x1c]
mov edx, 0x410
push eax
mov ecx, edi
call fcn.005210c0
mov edx, eax
mov dword [esp + 0x20], edx
test edx, edx
jns 0x50f64b
push 0
push 0x1c
lea eax, [esp + 0x44]
push eax
push 0
push edi
lfence
call dword [sym.imp.ntdll.dll_NtQueryInformationThread]
mov edx, eax
test edx, edx
js 0x50f62f
push dword ds:[esp + 0x44]
lea eax, [esp + 0x20]
push 0x410
push eax
call sym.SystemInformer.exe_PhOpenProcess
mov edx, eax
mov dword [esp + 0x20], eax
test edx, edx
jns 0x50f64b
lfence
mov eax, edx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x588]
xor ecx, esp
call fcn.0057c26f
mov esp, ebp
pop ebp
ret 0x1c
mov byte [esp + 0x17], 1
test esi, esi
je 0x50f710
mov ecx, dword fs:[0x18]
mov eax, dword [esi + 4]
cmp eax, dword [ecx + 0x24]
mov eax, dword [esi]
sete dl
mov dword [esp + 0x10], edx
test eax, eax
je 0x50f677
cmp eax, 4
jne 0x50f679
mov bl, 1
test bl, bl
jne 0x50f6ac
mov esi, 1
push 0
push 4
lea eax, [esp + 0x30]
push eax
push 9
push edi
call dword [sym.imp.ntdll.dll_NtQueryInformationThread]
mov edx, dword [esp + 0x10]
test eax, eax
js 0x50f6ac
mov eax, dword [esp + 0x28]
cmp eax, dword [0x631044]
movzx ebx, bl
cmova ebx, esi
test dl, dl
jne 0x50f6d2
test bl, bl
jne 0x50f6d2
push 0
push edi
call dword [sym.imp.ntdll.dll_NtSuspendThread]
mov ecx, dword [esp + 0x24]
test eax, eax
movzx ecx, cl
mov eax, 1
cmovns ecx, eax
mov dword [esp + 0x24], ecx
mov eax, dword [ebp + 0x18]
test al, 0x10
je 0x50f896
cmp dword [0x632e50], 3
jl 0x50f896
push 0x632e38
mov dword [esp + 0x14], 0
call dword [sym.imp.ntdll.dll_RtlInterlockedPopEntrySList]
mov esi, eax
test esi, esi
je 0x50f778
lock dec dword [0x632e40]
jmp 0x50f791
cmp edi, 0xfffffffe
jne 0x50f725
mov cl, 1
mov dword [esp + 0x10], ecx
jmp 0x50f67d
push 0
push 0x1c
lea eax, [esp + 0x74]
push eax
push 0
push edi
call dword [sym.imp.ntdll.dll_NtQueryInformationThread]
test eax, eax
js 0x50f67d
mov ecx, dword fs:[0x18]
mov esi, 1
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0x78]
movzx edx, dl
cmp eax, dword [ecx + 0x24]
mov eax, dword [esp + 0x74]
cmove edx, esi
mov dword [esp + 0x10], edx
test eax, eax
je 0x50f771
cmp eax, 4
jne 0x50f682
mov bl, 1
jmp 0x50f6ac
mov eax, dword [0x632e48]
add eax, 8
push eax
push 4
push dword [0x631034]
call dword [sym.imp.ntdll.dll_RtlAllocateHeap]
mov esi, eax
mov edx, 0xa
lea ecx, [esi + 8]
call fcn.0056dc40
mov eax, edi
mov dword [esi + 0x20], 0
mov dword [esi + 0x1c], eax
lea ecx, [esi + 8]
lea eax, [esp + 0x198]
mov dword [esi + 0x24], 0xfe
mov dword [esi + 0x28], eax
lea eax, [esp + 0x10]
mov dword [esi + 0x2c], eax
lea eax, [esp + 0x28]
mov dword [esi + 0x30], 0
mov dword [esp + 0x28], 0xffd23940
mov dword [esp + 0x2c], 0xffffffff
mov dword [esi + 0x38], eax
mov dword [esi + 0x34], 2
call fcn.00535f60
mov ebx, eax
test ebx, ebx
js 0x50f7f8
mov ebx, dword [esi + 0x18]
mov eax, dword [0x632e40]
push esi
cmp eax, dword [0x632e44]
jae 0x50f81c
push 0x632e38
call dword [sym.imp.ntdll.dll_RtlInterlockedPushEntrySList]
lock inc dword [0x632e40]
jmp 0x50f82a
push 0
push dword [0x631034]
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
test ebx, ebx
js 0x50f893
push 0x2c
lea eax, [esp + 0x40]
push 0
push eax
call fcn.0057e450
xor esi, esi
add esp, 0xc
cmp dword [esp + 0x10], esi
jbe 0x50f893
mov ebx, dword [esp + 0x38]
mov edi, dword [esp + 0x34]
nop
mov eax, dword [esp + esi*4 + 0x198]
mov dword [esp + 0x3c], eax
mov dword [esp + 0x60], 0x1014c
cmp eax, dword [0x631044]
jbe 0x50f88f
push edi
lea eax, [esp + 0x40]
mov ecx, ebx
push eax
call dword [0x5a08ec]
call ebx
jmp 0x50f880
test al, al
je 0x50fb2d
inc esi
cmp esi, dword [esp + 0x10]
jb 0x50f850
mov edi, dword [esp + 0x18]
mov eax, dword [ebp + 0x18]
test al, 1
je 0x50fb2d
push 0x2c8
lea eax, [esp + 0x1a0]
push 0
push eax
call fcn.0057e450
add esp, 0xc
mov dword [esp + 0x198], 0x10007
lea eax, [esp + 0x198]
push eax
push edi
call dword [sym.imp.ntdll.dll_NtGetContextThread]
mov dword [esp + 0x20], eax
test eax, eax
js 0x50fb2d
push pe_nt_image_headers32
lea eax, [esp + 0x8c]
push 0
push eax
lfence
call fcn.0057e450
mov eax, dword [esp + 0x25c]
add esp, 0xc
mov dword [esp + 0x88], eax
mov eax, dword [esp + 0x25c]
mov dword [esp + 0xb8], eax
mov eax, dword [esp + 0x24c]
mov dword [esp + 0x190], pe_nt_image_headers32
mov dword [esp + 0x94], 3
mov dword [esp + 0xc4], 3
mov dword [esp + 0xb4], 3
mov dword [esp + 0xa8], eax
mov ecx, dword [esp + 0x68]
xor edi, edi
mov ebx, dword [esp + 0x1c]
mov dword [esp + 0xac], 0
mov dword [esp + 0xbc], 0
mov dword [esp + 0x8c], 0
call fcn.0050e280
mov eax, dword [0x6310a0]
mov ecx, 0x632bf4
mov dword [esp + 0x28], eax
mov eax, dword [0x63106c]
mov dword [esp + 0x10], eax
call sym.SystemInformer.exe_PhfAcquireFastLockExclusive
mov esi, dword [0x631094]
lea ecx, [ecx]
test esi, esi
je 0x50f9dd
cmp dword [0x631080], edi
je 0x50f9dd
push edi
push edi
push dword [esp + 0x18]
lea eax, [esp + 0x1a4]
mov ecx, esi
push dword [esp + 0x34]
push edi
push eax
lea eax, [esp + 0xa0]
push eax
push dword [esp + 0x34]
push ebx
push 0x14c
call dword [0x5a08ec]
call esi
jmp 0x50fa17
mov esi, dword [0x63108c]
test esi, esi
je 0x50fa19
push 0
push dword [esp + 0x14]
lea eax, [esp + 0x1a0]
mov ecx, esi
push dword [esp + 0x30]
push 0
push eax
lea eax, [esp + 0x9c]
push eax
push dword [esp + 0x30]
push ebx
push 0x14c
call dword [0x5a08ec]
call esi
mov edi, eax
mov ecx, 0x632bf4
mov edi, edi
call sym.SystemInformer.exe_PhfReleaseFastLockExclusive
test edi, edi
je 0x50fb2d
mov ecx, dword ds:[esp + 0x88]
mov eax, ecx
mov edx, dword [esp + 0x8c]
or eax, edx
je 0x50fb2d
mov eax, ecx
and eax, edx
cmp eax, 0xffffffff
je 0x50fb2d
cmp dword ds:[esp + 0xd8], 0
mov eax, dword [esp + 0x98]
mov dword [esp + 0x40], eax
mov eax, dword [esp + 0xa8]
mov dword [esp + 0x44], eax
mov eax, dword [esp + 0xb8]
mov dword [esp + 0x48], eax
mov eax, dword [esp + 0xc8]
mov dword [esp + 0x4c], eax
mov eax, dword [esp + 0xe0]
mov dword [esp + 0x50], eax
mov eax, dword [esp + 0xe8]
mov dword [esp + 0x54], eax
mov eax, dword [esp + 0xf0]
mov dword [esp + 0x58], eax
mov eax, dword [esp + 0xf8]
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x5c], eax
mov dword [esp + 0x60], 0x14c
je 0x50facc
mov eax, 2
mov word [esp + 0x62], ax
mov eax, dword [esp + 0x194]
push dword [esp + 0x34]
mov ebx, dword [esp + 0x3c]
mov ecx, ebx
mov dword [esp + 0x68], eax
lea eax, [esp + 0x40]
push eax
call dword [0x5a08ec]
call ebx
test al, al
je 0x50fb2d
mov eax, dword [esp + 0x3c]
mov dword [esp + 0x250], eax
mov dword [esp + 0x88], eax
mov eax, dword [esp + 0x44]
mov dword [esp + 0x24c], eax
mov dword [esp + 0xa8], eax
mov eax, dword [esp + 0x48]
mov dword [esp + 0x25c], eax
mov dword [esp + 0xb8], eax
jmp 0x50f94b
cmp byte [esp + 0x24], 0
je 0x50fb46
push 0
push dword [esp + 0x1c]
call dword [sym.imp.ntdll.dll_NtResumeThread]
cmp byte [esp + 0x17], 0
je 0x50fb57
push dword [esp + 0x1c]
call dword [sym.imp.ntdll.dll_NtClose]
mov ecx, dword [esp + 0x594]
mov eax, dword [esp + 0x20]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0057c26f
mov esp, ebp
pop ebp
ret 0x1c