Function at 0x140166b30
Capabilities:
Parse pe header

Disassembly:
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
sub rsp, 0x88
mov rax, qword [0x140320740]
xor rax, rsp
mov qword [rsp + 0x70], rax
mov qword [rsp + 0x30], 0
mov qword [rsp + 0x58], 0
cmp qword [rsp + 0x98], 0
je 0x140166b8a
mov rax, qword [rsp + 0x90]
add rax, 0x10
mov rdx, qword [rsp + 0x98]
mov rcx, rax
call fcn.1401656c0
nop
mov rax, qword [rsp + 0x90]
add rax, 0x10
mov rcx, rax
call fcn.140165790
movzx eax, al
test eax, eax
jne 0x140166baf
mov eax, 0xc0000141
jmp 0x140166e3c
mov rax, qword [rsp + 0x90]
add rax, 0x10
mov rcx, rax
call fcn.1401681c0
mov qword [rsp + 0x30], rax
mov rax, qword [rsp + 0x30]
movzx eax, word [rax]
cmp eax, 0x5a4d
je 0x140166be1
mov eax, 0xc000007b
jmp 0x140166e3c
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 0x140166c37
mov eax, 0xc000007b
jmp 0x140166e3c
mov edx, reloc.WS2_32.dll_recv
lea rcx, [rsp + 0x60]
call fcn.140167d40
lea r8, [rsp + 0x58]
mov rdx, qword [rsp + 0x90]
lea rcx, [rsp + 0x60]
call fcn.140164cb0
nop
mov rax, qword [rsp + 0x90]
mov rax, qword [rax + 0x20]
movzx eax, word [rax + 0x18]
cmp eax, 0x20b
jne 0x140166c9a
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.140161d30
nop
jmp 0x140166cbd
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.140161dd0
nop
mov rax, qword [rsp + 0x90]
mov rax, qword [rax + 0x20]
movzx eax, word [rax + 0x16]
and eax, 0x2000
test eax, eax
jne 0x140166ce0
mov dword [rsp + 0x28], 1
jmp 0x140166ce8
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.140165880
mov qword [rsp + 0x38], rax
cmp qword [rsp + 0x38], 0
je 0x140166d33
mov rax, qword [rsp + 0x38]
mov eax, dword [rax + 0x10]
and eax, 1
test eax, eax
je 0x140166d33
mov byte [rsp + 0x20], 1
jmp 0x140166d38
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 0x140166ddf
mov rax, qword [rsp + 0x90]
add rax, 0x10
mov rcx, rax
call fcn.1401681c0
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.1401ac100
movzx eax, al
test eax, eax
je 0x140166ddf
mov rax, qword [rsp + 0x90]
add rax, 0x138
mov qword [rsp + 0x48], rax
xor edx, edx
mov rcx, qword [rsp + 0x48]
call fcn.1401ac410
nop
mov dword [rsp + 0x24], 0
jmp 0x140166e01
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 0x140166e3a
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.140164af0
nop
jmp 0x140166de9
xor eax, eax
mov rcx, qword [rsp + 0x70]
xor rcx, rsp
call fcn.1402164b0
add rsp, 0x88
ret