Function at 0x14004da90
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 0x14004ddbe
movsxd rdi, dword [rdx + 0x3c]
add rdi, rdx
cmp dword [rdi], 0x4550
jne 0x14004ddbe
test rdi, rdi
je 0x14004ddbe
mov eax, 0x20b
cmp word [rdi + 0x18], ax
jne 0x14004ddbe
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 0x14004ddbe
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 0x14004ddad
mov r8d, 4
mov rax, qword gs:[0x58]
mov rcx, qword [rax]
mov eax, dword [r8 + rcx]
cmp dword [0x1402e3a74], eax
jle 0x14004dc2d
lea rcx, [0x1402e3a74]
call fcn.140150460
cmp dword [0x1402e3a74], 0xffffffff
jne 0x14004dc25
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.140150108
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 [0x140175400]
mov dword [rax + 0x10], ecx
movzx ecx, byte [0x140175404]
mov byte [rax + 0x14], cl
mov byte [rax + 0x15], 0
lea r8, [rsp + 0x30]
mov rdx, qword [0x1402e2cb0]
mov rcx, r13
call fcn.14004faf0
mov qword [0x1402e3ad8], rax
mov rdx, qword [rsp + 0x48]
cmp rdx, 0xf
jbe 0x14004dc19
inc rdx
mov rcx, qword [rsp + 0x30]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14004dc13
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x14004dc13
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140150144
nop
lea rcx, [0x1402e3a74]
call fcn.1401503f4
mov rdx, qword [rsp + 0xa8]
cmp qword [0x1402e3ad8], 0
je 0x14004ddad
xor esi, esi
mov qword [rsp + 0xa0], rsi
mov qword [rsp + 0x20], rdx
lea rdx, [rsp + 0xa0]
mov rcx, r13
call fcn.140051c20
test al, al
je 0x14004ddad
mov r15, qword [rsp + 0xa0]
test r15, r15
je 0x14004ddad
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 0x14004dcc0
add rbx, rdi
test dword [rbx + 0x18], 0x80
ja 0x14004dcb2
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 0x14004dc95
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.140052d80
mov rdx, rbx
mov rcx, rax
call fcn.14004dde0
mov rdx, rsi
mov rcx, rbp
call fcn.14004dee0
test al, al
je 0x14004ddbe
mov rdx, rbp
lea rcx, [rsp + 0x30]
call fcn.140052eb0
mov rdx, rax
mov rcx, r13
call fcn.14004dfa0
test al, al
je 0x14004dd8f
lea r8, [r14 + rbp]
mov r9, qword [rsp + 0xa8]
mov rdx, r15
mov rcx, r13
call fcn.14004f7a0
test al, al
je 0x14004dd8f
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.14004e1f0
test al, al
je 0x14004dd8f
mov rax, qword [rsp + 0xd8]
test rax, rax
je 0x14004dd79
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 0x14004ddc0
xor edx, edx
mov r8d, 0x8000
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_VirtualFree]
mov rdx, r15
mov rcx, r13
call fcn.14004f9d0
jmp 0x14004ddbe
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