Function at 0x140164a20
Capabilities:
Parse pe header

Disassembly:
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
sub rsp, 0x88
mov rax, qword [0x14031e740]
xor rax, rsp
mov qword [rsp + 0x70], rax
mov qword [rsp + 0x30], 0
mov qword [rsp + 0x58], 0
cmp qword [rsp + 0x98], 0
je 0x140164a7a
mov rax, qword [rsp + 0x90]
add rax, 0x10
mov rdx, qword [rsp + 0x98]
mov rcx, rax
call fcn.140163580
nop
mov rax, qword [rsp + 0x90]
add rax, 0x10
mov rcx, rax
call fcn.140163680
movzx eax, al
test eax, eax
jne 0x140164a9f
mov eax, 0xc0000141
jmp 0x140164d2c
mov rax, qword [rsp + 0x90]
add rax, 0x10
mov rcx, rax
call fcn.1401660f0
mov qword [rsp + 0x30], rax
mov rax, qword [rsp + 0x30]
movzx eax, word [rax]
cmp eax, 0x5a4d
je 0x140164ad1
mov eax, 0xc000007b
jmp 0x140164d2c
mov rax, qword [rsp + 0x30]
movsxd rax, dword [rax + 0x3c]
mov rcx, qword [rsp + 0x30]
add rcx, rax
mov rax, rcx
mov rcx, qword [rsp + 0x90]
mov qword [rcx + 0x20], rax
mov rax, qword [rsp + 0x90]
mov rcx, qword [rsp + 0x90]
mov rcx, qword [rcx + 0x20]
mov qword [rax + 0x28], rcx
mov rax, qword [rsp + 0x90]
mov rax, qword [rax + 0x20]
cmp dword [rax], 0x4550
je 0x140164b27
mov eax, 0xc000007b
jmp 0x140164d2c
mov edx, reloc.WS2_32.dll_recv
lea rcx, [rsp + 0x60]
call fcn.140165c30
lea r8, [rsp + 0x58]
mov rdx, qword [rsp + 0x90]
lea rcx, [rsp + 0x60]
call fcn.140162b70
nop
mov rax, qword [rsp + 0x90]
mov rax, qword [rax + 0x20]
movzx eax, word [rax + 0x18]
cmp eax, 0x20b
jne 0x140164b8a
mov rax, qword [rsp + 0x90]
mov byte [rax + 0x19], 1
mov rax, qword [rsp + 0x90]
mov rdx, qword [rax + 0x28]
lea rcx, [rsp + 0x60]
call fcn.14015fbf0
nop
jmp 0x140164bad
mov rax, qword [rsp + 0x90]
mov byte [rax + 0x19], 0
mov rax, qword [rsp + 0x90]
mov rdx, qword [rax + 0x20]
lea rcx, [rsp + 0x60]
call fcn.14015fc90
nop
mov rax, qword [rsp + 0x90]
mov rax, qword [rax + 0x20]
movzx eax, word [rax + 0x16]
and eax, 0x2000
test eax, eax
jne 0x140164bd0
mov dword [rsp + 0x28], 1
jmp 0x140164bd8
mov dword [rsp + 0x28], 0
mov rax, qword [rsp + 0x90]
movzx ecx, byte [rsp + 0x28]
mov byte [rax + 0x1a], cl
mov r8d, 1
mov edx, reloc.WS2_32.dll_ntohl
mov rcx, qword [rsp + 0x90]
call fcn.140163770
mov qword [rsp + 0x38], rax
cmp qword [rsp + 0x38], 0
je 0x140164c23
mov rax, qword [rsp + 0x38]
mov eax, dword [rax + 0x10]
and eax, 1
test eax, eax
je 0x140164c23
mov byte [rsp + 0x20], 1
jmp 0x140164c28
mov byte [rsp + 0x20], 0
mov rax, qword [rsp + 0x90]
movzx ecx, byte [rsp + 0x20]
mov byte [rax + 0x1b], cl
mov rax, qword [rsp + 0x90]
movzx eax, byte [rax + 0x1b]
test eax, eax
je 0x140164ccf
mov rax, qword [rsp + 0x90]
add rax, 0x10
mov rcx, rax
call fcn.1401660f0
mov rcx, qword [rsp + 0x38]
sub rcx, rax
mov rax, rcx
add rax, 0x10
mov rcx, qword [rsp + 0x90]
mov dword [rcx + 0x58], eax
mov rax, qword [rsp + 0x90]
add rax, 0x138
mov qword [rsp + 0x40], rax
mov rax, qword [rsp + 0x90]
add rax, 0xf8
mov rdx, rax
mov rcx, qword [rsp + 0x40]
call fcn.1401aa030
movzx eax, al
test eax, eax
je 0x140164ccf
mov rax, qword [rsp + 0x90]
add rax, 0x138
mov qword [rsp + 0x48], rax
xor edx, edx
mov rcx, qword [rsp + 0x48]
call fcn.1401aa340
nop
mov dword [rsp + 0x24], 0
jmp 0x140164cf1
mov eax, dword [rsp + 0x24]
inc eax
mov dword [rsp + 0x24], eax
mov rax, qword [rsp + 0x58]
add rax, 0x28
mov qword [rsp + 0x58], rax
mov rax, qword [rsp + 0x90]
mov rax, qword [rax + 0x20]
movzx eax, word [rax + 6]
cmp dword [rsp + 0x24], eax
jge 0x140164d2a
mov rax, qword [rsp + 0x90]
add rax, 0x60
mov qword [rsp + 0x50], rax
mov rdx, qword [rsp + 0x58]
mov rcx, qword [rsp + 0x50]
call fcn.1401629b0
nop
jmp 0x140164cd9
xor eax, eax
mov rcx, qword [rsp + 0x70]
xor rcx, rsp
call fcn.1402143d0
add rsp, 0x88
ret