Function at 0x14004ead0
Capabilities:
Parse pe header

Disassembly:
mov qword [rsp + 0x20], r9
mov qword [rsp + 0x10], rdx
push rbx
push rbp
push rsi
push rdi
push r13
push r14
sub rsp, 0x58
xor r14d, r14d
mov rsi, rdx
mov r13, rcx
mov ebx, r14d
cmp rdx, 0x40
jb 0x14004eb16
mov eax, 0x5a4d
cmp word [rcx], ax
jne 0x14004efe2
movsxd rcx, dword [rcx + 0x3c]
lea rax, [rcx + 0x108]
cmp rdx, rax
jae 0x14004eb30
mov ecx, reloc.WS2_32.dll_listen
call qword [0x14020d2d8]
xor eax, eax
add rsp, 0x58
pop r14
pop r13
pop rdi
pop rsi
pop rbp
pop rbx
ret
cmp dword [rcx + r13], 0x4550
lea rbp, [rcx + r13]
jne 0x14004efe2
mov eax, 0x8664
cmp word [rbp + 4], ax
jne 0x14004efe2
mov eax, dword [rbp + 0x38]
test al, 1
jne 0x14004efe2
movzx ecx, word [rbp + 0x14]
mov r9d, eax
movzx eax, word [rbp + 6]
add rcx, 0x24
cmp r14w, ax
jae 0x14004eb9c
add rcx, rbp
mov r8d, eax
mov eax, dword [rcx + 4]
mov edx, dword [rcx]
test eax, eax
jne 0x14004eb86
lea rax, [r9 + rdx]
jmp 0x14004eb88
add eax, edx
cmp rax, rbx
cmovbe rax, rbx
add rcx, 0x28
mov rbx, rax
sub r8, 1
jne 0x14004eb77
lea rcx, [rsp + 0x20]
call qword [0x14020d290]
mov edx, dword [rsp + 0x24]
lea r8d, [rdx - 1]
lea edi, [rdx - 1]
not r8d
add edi, dword [rbp + 0x50]
lea rcx, [rdx - 1]
add rcx, rbx
and rdi, r8
and rcx, r8
cmp rdi, rcx
jne 0x14004efe2
mov rcx, qword [rbp + 0x30]
mov r9d, 4
mov r8d, 0x3000
mov qword [rsp + 0x50], r15
mov rdx, rdi
call qword [0x14020d2e0]
mov qword [rsp + 0xa8], rax
mov r15, rax
test rax, rax
jne 0x14004ec21
lea r9d, [rax + 4]
mov r8d, 0x3000
mov rdx, rdi
xor ecx, ecx
call qword [0x14020d2e0]
mov qword [rsp + 0xa8], rax
mov r15, rax
test rax, rax
je 0x14004ec52
call qword [0x14020d298]
mov edx, 8
mov rcx, rax
lea r8d, [rdx + 0x50]
call qword [0x14020d2d0]
mov rdi, rax
test rax, rax
jne 0x14004ec64
xor edx, edx
mov r8d, 0x8000
mov rcx, r15
call qword [0x14020d2c8]
mov ecx, reloc.WS2_32.dll_ntohl
call qword [0x14020d2d8]
xor eax, eax
jmp 0x14004ed52
mov qword [rax + 8], r15
movzx eax, word [rbp + 0x16]
shr eax, 0xd
and eax, 1
mov qword [rdi + 0x40], r14
mov dword [rdi + 0x20], eax
lea rax, [0x14004eaa0]
mov qword [rdi + 0x28], rax
lea rax, [0x14004eab0]
mov qword [rdi + 0x30], rax
lea rax, [0x14004eac0]
mov qword [rdi + 0x38], rax
mov eax, dword [rsp + 0x24]
mov dword [rdi + 0x50], eax
mov edx, dword [rbp + 0x54]
mov qword [rsp + 0x90], r12
cmp rsi, rdx
jae 0x14004ed64
mov ecx, reloc.WS2_32.dll_listen
call qword [0x14020d2d8]
cmp dword [rdi + 0x1c], r14d
je 0x14004ecdc
mov rax, qword [rdi]
xor r8d, r8d
mov rcx, qword [rdi + 8]
xor edx, edx
mov r9d, dword [rax + 0x28]
add r9, rcx
call r9
mov rcx, qword [rdi + 0x10]
test rcx, rcx
je 0x14004ed1d
cmp dword [rdi + 0x18], r14d
jle 0x14004ed18
mov rbx, r14
nop
mov rcx, qword [rdi + 0x10]
mov rax, qword [rbx + rcx]
test rax, rax
je 0x14004ed0b
mov rdx, qword [rdi + 0x40]
mov rcx, rax
call qword [rdi + 0x38]
mov rcx, qword [rdi + 0x10]
inc r14d
add rbx, 8
cmp r14d, dword [rdi + 0x18]
jl 0x14004ecf0
call fcn.140125238
mov rcx, qword [rdi + 8]
test rcx, rcx
je 0x14004ed34
xor edx, edx
mov r8d, 0x8000
call qword [0x14020d2c8]
call qword [0x14020d298]
mov r8, rdi
xor edx, edx
mov rcx, rax
call qword [0x14020d2b0]
xor eax, eax
mov r12, qword [rsp + 0x90]
mov r15, qword [rsp + 0x50]
add rsp, 0x58
pop r14
pop r13
pop rdi
pop rsi
pop rbp
pop rbx
ret
mov r9d, 4
mov r8d, 0x1000
mov rcx, r15
call qword [0x14020d2e0]
mov r8d, dword [rbp + 0x54]
mov rdx, r13
mov rcx, rax
mov rbx, rax
call fcn.140121290
movsxd rax, dword [r13 + 0x3c]
mov r12d, r14d
add rax, rbx
mov qword [rdi], rax
mov qword [rax + 0x30], r15
mov rcx, qword [rdi]
mov r15, qword [rdi + 8]
movzx esi, word [rcx + 0x14]
add rsi, 0x24
cmp r14w, word [rcx + 6]
jae 0x14004ee6f
add rsi, rcx
nop dword [rax]
mov edx, dword [rsi + 4]
test edx, edx
jne 0x14004ee0b
movsxd rax, dword [rbp + 0x38]
test eax, eax
jle 0x14004ee58
mov ecx, dword [rsi]
lea r9d, [rdx + 4]
add rcx, r15
mov r8d, 0x1000
mov rdx, rax
mov rbx, rax
call qword [0x14020d2e0]
test rax, rax
je 0x14004ecc0
mov ecx, dword [rsi]
mov r8, rbx
add rcx, r15
xor edx, edx
mov dword [rsi - 4], ecx
call fcn.1401216a0
jmp 0x14004ee58
mov eax, dword [rsi + 8]
add eax, edx
cmp qword [rsp + 0x98], rax
jb 0x14004ecb5
mov ecx, dword [rsi]
mov r9d, 4
add rcx, r15
mov r8d, 0x1000
call qword [0x14020d2e0]
test rax, rax
je 0x14004ecc0
mov ebx, dword [rsi]
mov edx, dword [rsi + 8]
add rbx, r15
mov r8d, dword [rsi + 4]
mov rcx, rbx
add rdx, r13
call fcn.140121290
mov dword [rsi - 4], ebx
mov rcx, qword [rdi]
inc r12d
add rsi, 0x28
movzx eax, word [rcx + 6]
cmp r12d, eax
jl 0x14004edc0
mov rbx, qword [rcx + 0x30]
sub rbx, qword [rbp + 0x30]
je 0x14004ef19
cmp dword [rcx + 0xb4], r14d
jne 0x14004ee8e
mov eax, r14d
jmp 0x14004ef1e
mov rsi, qword [rdi + 8]
mov r11d, dword [rcx + 0xb0]
add r11, rsi
mov eax, dword [r11]
test eax, eax
je 0x14004ef19
nop dword [rax]
nop word [rax + rax]
mov r9d, dword [r11 + 4]
lea rdx, [r11 + 8]
mov r10d, eax
mov r8d, r14d
add r10, rsi
lea rax, [r9 - 8]
test rax, 0xfffffffffffffffe
jbe 0x14004ef0c
nop dword [rax]
movzx eax, word [rdx]
mov ecx, eax
shr eax, 0xc
and ecx, 0xfff
cmp eax, 3
je 0x14004eeee
cmp eax, 0xa
jne 0x14004eef2
add qword [rcx + r10], rbx
jmp 0x14004eef2
add dword [rcx + r10], ebx
mov r9d, dword [r11 + 4]
inc r8d
add rdx, 2
mov eax, r8d
lea rcx, [r9 - 8]
shr rcx, 1
cmp rax, rcx
jb 0x14004eed0
mov eax, r9d
add r11, rax
mov eax, dword [r11]
test eax, eax
jne 0x14004eeb0
mov eax, 1
mov rcx, rdi
mov dword [rdi + 0x24], eax
call fcn.14004e910
test eax, eax
je 0x14004ecc0
mov rcx, rdi
call fcn.14004e6b0
test eax, eax
je 0x14004ecc0
mov rdx, qword [rdi]
mov rcx, rdx
mov eax, dword [rdx + 0xd0]
test eax, eax
je 0x14004ef8c
mov rsi, qword [rdi + 8]
mov rbx, qword [rax + rsi + 0x18]
test rbx, rbx
je 0x14004ef8c
mov rax, qword [rbx]
test rax, rax
je 0x14004ef8c
nop word [rax + rax]
xor r8d, r8d
mov rcx, rsi
lea edx, [r8 + 1]
call rax
mov rax, qword [rbx + 8]
lea rbx, [rbx + 8]
test rax, rax
jne 0x14004ef70
mov rcx, qword [rdi]
mov eax, dword [rcx + 0x28]
test eax, eax
je 0x14004efd6
mov rcx, qword [rsp + 0xa8]
add rax, rcx
cmp dword [rdi + 0x20], r14d
je 0x14004efca
xor r8d, r8d
lea edx, [r8 + 1]
call rax
test eax, eax
jne 0x14004efbb
mov ecx, 0x45a
jmp 0x14004ecba
mov dword [rdi + 0x1c], 1
mov rax, rdi
jmp 0x14004ed4a
mov qword [rdi + 0x48], rax
mov rax, rdi
jmp 0x14004ed4a
mov qword [rdi + 0x48], r14
mov rax, rdi
jmp 0x14004ed4a
mov ecx, 0xc1
call qword [0x14020d2d8]
xor eax, eax
add rsp, 0x58
pop r14
pop r13
pop rdi
pop rsi
pop rbp
pop rbx
ret