Function at 0x1400539b0
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 0x140053cc7
movsxd rdi, dword [rdx + 0x3c]
add rdi, rdx
cmp dword [rdi], 0x4550
jne 0x140053cc7
mov eax, 0x20b
cmp word [rdi + 0x18], ax
jne 0x140053cc7
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 0x140053cc7
movzx ecx, word [rdi + 0x14]
mov eax, dword [rcx + rdi + 0x24]
mov dword [rsp + 0xa0], eax
sub ebx, eax
mov r13d, ebx
je 0x140053cb6
mov ecx, 4
mov rax, qword gs:[0x58]
mov rax, qword [rax]
xor esi, esi
mov eax, dword [rcx + rax]
cmp dword [0x1402eaaa4], eax
jle 0x140053b3d
lea rcx, [0x1402eaaa4]
call fcn.1401585e4
cmp dword [0x1402eaaa4], 0xffffffff
jne 0x140053b3d
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.14015827c
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x40], reloc.WS2_32.dll_setsockopt
mov qword [rsp + 0x48], Ordinal_35
movups xmm0, xmmword [str.ExAllocatePoolWithTag]
movups xmmword [rax], xmm0
mov ecx, dword [0x14017d440]
mov dword [rax + 0x10], ecx
movzx ecx, byte [0x14017d444]
mov byte [rax + 0x14], cl
mov byte [rax + 0x15], sil
lea r8, [rsp + 0x30]
mov rdx, qword [0x1402e9cc0]
mov rcx, r12
call fcn.140055c50
mov qword [0x1402eab08], rax
mov rdx, qword [rsp + 0x48]
cmp rdx, 0x10
jb 0x140053b31
inc rdx
mov rcx, qword [rsp + 0x30]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140053b2b
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140053b2b
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.1401582b8
nop
lea rcx, [0x1402eaaa4]
call fcn.140158578
cmp qword [0x1402eab08], 0
je 0x140053cb6
mov qword [rsp + 0x98], rsi
mov qword [rsp + 0x20], r13
lea rdx, [rsp + 0x98]
mov rcx, r12
call fcn.140057e10
test al, al
je 0x140053cb6
mov r15, qword [rsp + 0x98]
test r15, r15
je 0x140053cb6
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 0x140053bce
add rbx, rdi
test dword [rbx + 0x18], 0x80
ja 0x140053bc0
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 0x140053ba3
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.140058ca0
mov rdx, rbx
mov rcx, rax
call fcn.140053cf0
mov rdx, rsi
mov rcx, rbp
call fcn.140053df0
test al, al
je 0x140053cc7
mov rdx, rbp
lea rcx, [rsp + 0x30]
call fcn.140058dd0
mov rdx, rax
mov rcx, r12
call fcn.140053ea0
test al, al
je 0x140053c98
lea r8, [r14 + rbp]
mov r9, r13
mov rdx, r15
mov rcx, r12
call fcn.1400558f0
test al, al
je 0x140053c98
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.1400540f0
test al, al
je 0x140053c98
mov rdx, qword [rsp + 0xc8]
test rdx, rdx
je 0x140053c82
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 0x140053cc9
xor edx, edx
mov r8d, 0x8000
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_VirtualFree]
mov rdx, r15
mov rcx, r12
call fcn.140055b20
jmp 0x140053cc7
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