Function at 0x140050ec0
Capabilities:
Parse pe header

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
mov qword [rsp + 0x20], r9
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x50
mov r14, rdx
mov r12, rcx
mov eax, 0x5a4d
cmp word [rdx], ax
jne 0x1400511d7
movsxd rdi, dword [rdx + 0x3c]
add rdi, rdx
cmp dword [rdi], 0x4550
jne 0x1400511d7
mov eax, 0x20b
cmp word [rdi + 0x18], ax
jne 0x1400511d7
mov ebx, dword [rdi + 0x50]
mov edx, ebx
xor ecx, ecx
lea r9d, [rcx + 4]
mov r8d, 0x3000
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov rbp, rax
test rax, rax
je 0x1400511d7
movzx ecx, word [rdi + 0x14]
mov eax, dword [rcx + rdi + 0x24]
mov dword [rsp + 0xa0], eax
sub ebx, eax
mov r13d, ebx
je 0x1400511c6
mov ecx, 4
mov rax, qword gs:[0x58]
mov rax, qword [rax]
xor esi, esi
mov eax, dword [rcx + rax]
cmp dword [0x1402e69e4], eax
jle 0x14005104d
lea rcx, [0x1402e69e4]
call fcn.140154d0c
cmp dword [0x1402e69e4], 0xffffffff
jne 0x14005104d
xorps xmm0, xmm0
movups xmmword [rsp + 0x30], xmm0
mov qword [rsp + 0x40], rsi
mov qword [rsp + 0x48], reloc.WS2_32.dll_ntohs
lea ecx, [rsi + 0x20]
call fcn.1401549b4
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x40], reloc.WS2_32.dll_setsockopt
mov qword [rsp + 0x48], Ordinal_32
movups xmm0, xmmword [str.ExAllocatePoolWithTag]
movups xmmword [rax], xmm0
mov ecx, dword [0x140179400]
mov dword [rax + 0x10], ecx
movzx ecx, byte [0x140179404]
mov byte [rax + 0x14], cl
mov byte [rax + 0x15], sil
lea r8, [rsp + 0x30]
mov rdx, qword [0x1402e5bd0]
mov rcx, r12
call fcn.140052fa0
mov qword [0x1402e6a48], rax
mov rdx, qword [rsp + 0x48]
cmp rdx, 0xf
jbe 0x140051041
inc rdx
mov rcx, qword [rsp + 0x30]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14005103b
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x14005103b
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.1401549f0
nop
lea rcx, [0x1402e69e4]
call fcn.140154ca0
cmp qword [0x1402e6a48], 0
je 0x1400511c6
mov qword [rsp + 0x98], rsi
mov qword [rsp + 0x20], r13
lea rdx, [rsp + 0x98]
mov rcx, r12
call fcn.140055160
test al, al
je 0x1400511c6
mov r15, qword [rsp + 0x98]
test r15, r15
je 0x1400511c6
mov r8d, dword [rdi + 0x54]
mov rdx, r14
mov rcx, rbp
call sub.VCRUNTIME140.dll_memcpy
movzx ebx, word [rdi + 0x14]
add rbx, 0x24
xor eax, eax
cmp ax, word [rdi + 6]
jae 0x1400510de
add rbx, rdi
test dword [rbx + 0x18], 0x80
ja 0x1400510d0
mov ecx, dword [rbx]
add rcx, rbp
mov r8d, dword [rbx + 4]
mov edx, dword [rbx + 8]
add rdx, r14
call sub.VCRUNTIME140.dll_memcpy
inc esi
add rbx, 0x28
movzx eax, word [rdi + 6]
cmp esi, eax
jl 0x1400510b3
mov r14d, dword [rsp + 0xa0]
mov rsi, r15
sub rsi, r14
mov rbx, rsi
sub rbx, qword [rdi + 0x30]
mov rdx, rbp
lea rcx, [rsp + 0x30]
call fcn.1400561b0
mov rdx, rbx
mov rcx, rax
call fcn.140051200
mov rdx, rsi
mov rcx, rbp
call fcn.140051300
test al, al
je 0x1400511d7
mov rdx, rbp
lea rcx, [rsp + 0x30]
call fcn.1400562e0
mov rdx, rax
mov rcx, r12
call fcn.1400513b0
test al, al
je 0x1400511a8
lea r8, [r14 + rbp]
mov r9, r13
mov rdx, r15
mov rcx, r12
call fcn.140052c40
test al, al
je 0x1400511a8
mov r8d, dword [rdi + 0x28]
add r8, rsi
xor eax, eax
mov dword [rsp + 0xa0], eax
mov qword [rsp + 0x20], rax
xor r9d, r9d
lea rdx, [rsp + 0xa0]
mov rcx, r12
call fcn.140051580
test al, al
je 0x1400511a8
mov rdx, qword [rsp + 0xc8]
test rdx, rdx
je 0x140051192
mov ecx, dword [rsp + 0xa0]
mov dword [rdx], ecx
xor edx, edx
mov r8d, 0x8000
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_VirtualFree]
mov rax, r15
jmp 0x1400511d9
xor edx, edx
mov r8d, 0x8000
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_VirtualFree]
mov rdx, r15
mov rcx, r12
call fcn.140052e70
jmp 0x1400511d7
xor edx, edx
mov r8d, 0x8000
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_VirtualFree]
xor eax, eax
lea r11, [rsp + 0x50]
mov rbx, qword [r11 + 0x30]
mov rbp, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rdi
ret