Function at 0x14004f060
Capabilities:
Parse pe header

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x20], r9
mov qword [rsp + 0x18], r8
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x50
mov r14, rdx
mov r13, rcx
mov eax, 0x5a4d
cmp word [rdx], ax
jne 0x14004f38e
movsxd rdi, dword [rdx + 0x3c]
add rdi, rdx
cmp dword [rdi], 0x4550
jne 0x14004f38e
test rdi, rdi
je 0x14004f38e
mov eax, 0x20b
cmp word [rdi + 0x18], ax
jne 0x14004f38e
mov ebx, dword [rdi + 0x50]
mov edx, ebx
xor ecx, ecx
mov r9d, 4
mov r8d, 0x3000
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov rbp, rax
test rax, rax
je 0x14004f38e
movzx ecx, word [rdi + 0x14]
mov eax, dword [rcx + rdi + 0x24]
mov dword [rsp + 0xb0], eax
sub ebx, eax
mov edx, ebx
mov qword [rsp + 0xa8], rdx
je 0x14004f37d
mov r8d, 4
mov rax, qword gs:[0x58]
mov rcx, qword [rax]
mov eax, dword [r8 + rcx]
cmp dword [0x1402e0b54], eax
jle 0x14004f1fd
lea rcx, [0x1402e0b54]
call fcn.14014d020
cmp dword [0x1402e0b54], 0xffffffff
jne 0x14004f1f5
xorps xmm0, xmm0
movups xmmword [rsp + 0x30], xmm0
xorps xmm1, xmm1
movdqu xmmword [rsp + 0x40], xmm1
mov ecx, reloc.WLDAP32.dll_Ordinal_32
call fcn.14014ccc8
mov qword [rsp + 0x30], rax
movdqa xmm0, xmmword [reloc.WS2_32.dll_setsockopt]
movdqu xmmword [rsp + 0x40], xmm0
movups xmm0, xmmword [str.ExAllocatePoolWithTag]
movups xmmword [rax], xmm0
mov ecx, dword [0x140172420]
mov dword [rax + 0x10], ecx
movzx ecx, byte [0x140172424]
mov byte [rax + 0x14], cl
mov byte [rax + 0x15], 0
lea r8, [rsp + 0x30]
mov rdx, qword [0x1402dfcd0]
mov rcx, r13
call fcn.140051040
mov qword [0x1402e0bb8], rax
mov rdx, qword [rsp + 0x48]
cmp rdx, 0xf
jbe 0x14004f1e9
inc rdx
mov rcx, qword [rsp + 0x30]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14004f1e3
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x14004f1e3
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.14014cd04
nop
lea rcx, [0x1402e0b54]
call fcn.14014cfb4
mov rdx, qword [rsp + 0xa8]
cmp qword [0x1402e0bb8], 0
je 0x14004f37d
xor esi, esi
mov qword [rsp + 0xa0], rsi
mov qword [rsp + 0x20], rdx
lea rdx, [rsp + 0xa0]
mov rcx, r13
call fcn.1400531d0
test al, al
je 0x14004f37d
mov r15, qword [rsp + 0xa0]
test r15, r15
je 0x14004f37d
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 0x14004f290
add rbx, rdi
test dword [rbx + 0x18], 0x80
ja 0x14004f282
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 0x14004f265
mov r14d, dword [rsp + 0xb0]
mov rsi, r15
sub rsi, r14
mov rbx, rsi
sub rbx, qword [rdi + 0x30]
mov rdx, rbp
lea rcx, [rsp + 0x30]
call fcn.140054330
mov rdx, rbx
mov rcx, rax
call fcn.14004f3b0
mov rdx, rsi
mov rcx, rbp
call fcn.14004f4b0
test al, al
je 0x14004f38e
mov rdx, rbp
lea rcx, [rsp + 0x30]
call fcn.140054460
mov rdx, rax
mov rcx, r13
call fcn.14004f570
test al, al
je 0x14004f35f
lea r8, [r14 + rbp]
mov r9, qword [rsp + 0xa8]
mov rdx, r15
mov rcx, r13
call fcn.140050cf0
test al, al
je 0x14004f35f
mov r8d, dword [rdi + 0x28]
add r8, rsi
xor eax, eax
mov dword [rsp + 0xb0], eax
mov qword [rsp + 0x20], rax
xor r9d, r9d
lea rdx, [rsp + 0xb0]
mov rcx, r13
call fcn.14004f740
test al, al
je 0x14004f35f
mov rax, qword [rsp + 0xd8]
test rax, rax
je 0x14004f349
mov ecx, dword [rsp + 0xb0]
mov dword [rax], ecx
xor edx, edx
mov r8d, 0x8000
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_VirtualFree]
mov rax, r15
jmp 0x14004f390
xor edx, edx
mov r8d, 0x8000
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_VirtualFree]
mov rdx, r15
mov rcx, r13
call fcn.140050f20
jmp 0x14004f38e
xor edx, edx
mov r8d, 0x8000
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_VirtualFree]
xor eax, eax
mov rbx, qword [rsp + 0x90]
add rsp, 0x50
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret