Function at 0x1400859f0
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push rbx
sub rsp, 0x70
mov rax, qword [0x1401ec840]
xor rax, rsp
mov qword [rsp + 0x40], rax
mov rax, qword [rcx + 0x20]
mov qword [rsp + 0x98], rdi
mov rdi, rcx
mov qword [rsp + 0x50], r15
mov r15d, edx
mov rcx, qword [rax + 0x18]
test rcx, rcx
je 0x140085a2b
call qword [0x1401ecb20]
mov rcx, qword [rdi + 0x28]
cmp byte [rcx + 0x11], 0
je 0x140085a43
inc dword [rcx + 0x14]
cmp byte [rcx + 0x12], 0
jne 0x140085a43
call fcn.1400756c0
mov rdx, qword [rdi]
test rdx, rdx
je 0x140085a5d
mov rcx, qword [rdx + 0x18]
test rcx, rcx
je 0x140085a5d
call qword [0x1401ecb20]
mov rdx, qword [rdi]
mov ebx, dword [rdi + 0x30]
test ebx, ebx
je 0x140085a70
lea eax, [rbx - 5]
cmp eax, 1
ja 0x14008611b
mov r10, qword [rdi + 8]
mov rcx, qword [rdi + 0x28]
mov r9, r10
mov qword [rsp + 0x88], rbp
mov qword [rsp + 0x90], rsi
mov qword [rsp + 0x68], r12
mov r8, qword [rcx + 8]
mov qword [rsp + 0x60], r13
mov qword [rsp + 0x58], r14
mov dword [rsp + 0x28], 0
mov rax, qword [r8]
mov qword [rsp + 0x38], rax
mov rax, qword [r10 + 8]
mov r13, qword [rax]
test rdx, rdx
je 0x140085ac8
cmp byte [r8 + 0x24], 2
jne 0x140085ac8
mov ebx, 5
jmp 0x140085afd
xor ebx, ebx
test rcx, rcx
je 0x140085ad4
cmp byte [rcx + 0x10], bl
jne 0x140085afd
cmp byte [rcx + 0x11], bl
jne 0x140085ade
cmp byte [rcx + 0x10], bl
jne 0x140085aea
xor r8d, r8d
xor edx, edx
call fcn.140079130
mov ebx, eax
mov r10, qword [rdi + 8]
mov rcx, qword [rdi + 0x28]
mov r9, r10
mov dword [rsp + 0x28], 1
cmp dword [rdi + 0x14], 0
mov esi, 7
jne 0x140085b33
test ebx, ebx
jne 0x140085ba7
mov rax, qword [rcx + 8]
xor r9d, r9d
xor r8d, r8d
mov rcx, r10
mov edx, dword [rax + 0x34]
call fcn.1400789a0
cmp eax, esi
jne 0x140085b2d
mov ebx, esi
jmp 0x140085ba7
mov r9, qword [rdi + 8]
jmp 0x140085b37
test ebx, ebx
jne 0x140085ba7
cmp dword [rdi + 0x14], 0
jne 0x140085ba7
cmp byte [r9 + 0x11], 0
lea r8, [rdi + 0x10]
jne 0x140085b8d
cmp byte [r9 + 0x10], 2
jb 0x140085b8d
mov r10, qword [r9 + 8]
test r8, r8
je 0x140085b68
mov rax, qword [r10 + 0x18]
mov rcx, qword [rax + 0x50]
mov eax, dword [rcx + 0x28]
bswap eax
mov dword [r8], eax
mov rax, qword [r9]
mov rcx, qword [r10]
mov edx, dword [rax + 0x2f0]
cmp edx, dword [rcx + 0x80]
jle 0x140085b89
cmp byte [rcx + 0xa], 0
je 0x140085b89
call fcn.1400706d0
jmp 0x140085b9a
xor ebx, ebx
jmp 0x140085b9c
mov edx, 2
mov rcx, r9
call fcn.140079130
mov ebx, eax
test ebx, ebx
jne 0x140085ba7
mov dword [rdi + 0x14], 1
mov rax, qword [rdi + 0x28]
mov r14, qword [rax + 8]
mov rax, qword [rdi + 8]
mov ecx, dword [r14 + 0x34]
mov rax, qword [rax + 8]
mov dword [rsp + 0x20], ecx
mov r8d, dword [rax + 0x34]
mov rax, qword [rax]
mov dword [rsp + 0x24], r8d
movzx r12d, byte [rax + 9]
test ebx, ebx
jne 0x140085bf1
cmp r12b, 5
je 0x140085be6
cmp byte [r13 + 0x10], bl
jne 0x140085be6
cmp byte [r13 + 0x14], bl
je 0x140085bf1
cmp ecx, r8d
mov eax, 8
cmovne ebx, eax
mov r14d, dword [r14 + 0x40]
xor ebp, ebp
test r15d, r15d
js 0x140085c05
cmp ebp, r15d
jge 0x140085cd9
mov esi, dword [rdi + 0x18]
cmp esi, r14d
ja 0x140085cd9
test ebx, ebx
jne 0x140085d1e
mov rax, qword [rdi + 0x28]
xor edx, edx
mov rcx, qword [rax + 8]
mov eax, dword [0x1401eccac]
div dword [rcx + 0x34]
inc eax
cmp esi, eax
je 0x140085ccf
mov rax, qword [rsp + 0x38]
lea r8, [rsp + 0x30]
mov r9d, 2
mov edx, esi
mov rcx, rax
call qword [rax + 0x110]
mov ebx, eax
test eax, eax
jne 0x140085ccf
mov r8, qword [rsp + 0x30]
xor r9d, r9d
mov edx, esi
mov rcx, rdi
mov r8, qword [r8 + 8]
call fcn.1400857e0
mov r10, qword [rsp + 0x30]
mov ebx, eax
test r10, r10
je 0x140085ccf
test byte [r10 + 0x34], 0x20
je 0x140085cc7
mov r8, qword [r10 + 0x28]
dec dword [r8 + 0x98]
mov rax, qword [r8 + 0xa8]
mov qword [r10 + 0x20], rax
mov rcx, qword [r8 + 0x48]
mov qword [r8 + 0xa8], r10
mov edx, dword [r10 + 0x30]
dec edx
imul rdx, qword [r8 + 0xc8]
mov r9, qword [rcx]
mov r8, qword [r10 + 8]
call qword [r9 + 0x90]
inc dword [rdi + 0x18]
inc ebp
jmp 0x140085bf7
mov rcx, r10
call fcn.140069650
inc dword [rdi + 0x18]
inc ebp
jmp 0x140085bf7
test ebx, ebx
jne 0x140085d1e
mov eax, r14d
mov dword [rdi + 0x38], r14d
sub eax, dword [rdi + 0x18]
inc eax
mov dword [rdi + 0x34], eax
cmp dword [rdi + 0x18], r14d
ja 0x140085d27
cmp dword [rdi + 0x3c], ebx
jne 0x1400860ce
mov rax, qword [rdi + 0x28]
mov rcx, qword [rax + 8]
mov rdx, qword [rcx]
mov rax, qword [rdx + 0x70]
mov qword [rdi + 0x40], rax
mov qword [rdx + 0x70], rdi
mov dword [rdi + 0x3c], 1
jmp 0x1400860ce
cmp ebx, 0x65
jne 0x1400860ce
test r14d, r14d
jne 0x140085d84
mov rsi, qword [rdi + 8]
cmp byte [rsi + 0x11], r14b
je 0x140085d47
inc dword [rsi + 0x14]
cmp byte [rsi + 0x12], r14b
jne 0x140085d47
mov rcx, rsi
call fcn.1400756c0
mov rax, qword [rsi + 8]
mov dword [rax + 0x40], 0
mov rcx, qword [rsi + 8]
call fcn.140079020
cmp byte [rsi + 0x11], 0
mov ebx, eax
je 0x140085d71
sub dword [rsi + 0x14], 1
jne 0x140085d71
mov rcx, rsi
call fcn.140075690
mov r14d, 1
test ebx, ebx
je 0x140085d84
cmp ebx, 0x65
jne 0x1400860ce
mov r8d, dword [rdi + 0x10]
mov edx, 1
mov rcx, qword [rdi + 8]
inc r8d
call fcn.140083c10
mov ebx, eax
test eax, eax
jne 0x1400860ce
mov rcx, qword [rdi]
test rcx, rcx
je 0x140085db0
call fcn.1400b9330
cmp r12b, 5
jne 0x140085dce
mov rcx, qword [rdi + 8]
mov edx, 2
call fcn.140085360
mov ebx, eax
test eax, eax
jne 0x1400860ce
movsxd r9, dword [rsp + 0x20]
mov ecx, dword [rsp + 0x24]
cmp r9d, ecx
jge 0x140086096
mov r15, qword [r13 + 0x48]
mov eax, ecx
mov ebp, dword [r13 + 0x20]
cdq
idiv r9d
movsxd r12, r14d
mov ecx, eax
dec eax
add eax, r14d
cdq
idiv ecx
xor edx, edx
mov r8d, eax
mov rax, qword [rdi + 8]
mov rcx, qword [rax + 8]
lea esi, [r8 - 1]
mov eax, dword [0x1401eccac]
div dword [rcx + 0x34]
inc eax
cmp r8d, eax
cmovne esi, r8d
imul r12, r9
cmp esi, ebp
ja 0x140085f1e
mov rax, qword [rdi + 8]
xor edx, edx
mov rcx, qword [rax + 8]
mov eax, dword [0x1401eccac]
div dword [rcx + 0x34]
inc eax
cmp esi, eax
je 0x140085f12
xor r9d, r9d
lea r8, [rsp + 0x30]
mov edx, esi
mov rcx, r13
call qword [r13 + 0x110]
mov ebx, eax
test eax, eax
jne 0x140085f12
mov r10, qword [rsp + 0x30]
test byte [r10 + 0x34], 4
mov rcx, qword [r10 + 0x28]
je 0x140085e94
mov eax, dword [r10 + 0x30]
cmp dword [rcx + 0x20], eax
jb 0x140085e94
cmp dword [rcx + 0x80], ebx
je 0x140085e90
mov rcx, r10
call fcn.14006e290
jmp 0x140085eb8
xor ebx, ebx
jmp 0x140085ebf
mov ebx, dword [rcx + 0x30]
test ebx, ebx
jne 0x140085ebf
mov eax, dword [rcx + 0xc8]
cmp dword [rcx + 0xb8], eax
mov rcx, r10
jbe 0x140085eb3
call fcn.14006fde0
jmp 0x140085eb8
call fcn.14006fd30
mov r10, qword [rsp + 0x30]
mov ebx, eax
test r10, r10
je 0x140085f12
test byte [r10 + 0x34], 0x20
je 0x140085f0a
mov r8, qword [r10 + 0x28]
dec dword [r8 + 0x98]
mov rax, qword [r8 + 0xa8]
mov qword [r10 + 0x20], rax
mov rcx, qword [r8 + 0x48]
mov qword [r8 + 0xa8], r10
mov edx, dword [r10 + 0x30]
dec edx
imul rdx, qword [r8 + 0xc8]
mov r9, qword [rcx]
mov r8, qword [r10 + 8]
call qword [r9 + 0x90]
jmp 0x140085f12
mov rcx, r10
call fcn.140069650
inc esi
test ebx, ebx
je 0x140085e22
jmp 0x140085f34
test ebx, ebx
jne 0x140085f34
xor edx, edx
mov r8d, 1
mov rcx, r13
call fcn.140070120
mov ebx, eax
mov edx, dword [0x1401eccac]
mov r14, r12
mov eax, dword [rsp + 0x24]
movsxd r9, dword [rsp + 0x20]
add eax, edx
movsxd rcx, eax
cmp rcx, r12
cmovl r14, rcx
lea eax, [rdx + r9]
movsxd rsi, eax
test ebx, ebx
jne 0x1400860ce
mov rbp, r9
cmp rsi, r14
jge 0x140086022
mov rax, rsi
mov qword [rsp + 0x30], 0
cqo
lea r8, [rsp + 0x30]
idiv rbp
xor r9d, r9d
lea edx, [rax + 1]
mov rax, qword [rsp + 0x38]
mov rcx, rax
call qword [rax + 0x110]
mov ebx, eax
test eax, eax
jne 0x140085fba
mov rax, qword [rsp + 0x30]
mov r9, rsi
mov r10, qword [r15]
mov rcx, r15
mov r8d, dword [rsp + 0x20]
mov rdx, qword [rax + 8]
call qword [r10 + Ordinal_27]
mov ebx, eax
mov r8, qword [rsp + 0x30]
test r8, r8
je 0x140086012
test byte [r8 + 0x34], 0x20
je 0x14008600a
mov r10, qword [r8 + 0x28]
dec dword [r10 + 0x98]
mov rax, qword [r10 + 0xa8]
mov qword [r8 + 0x20], rax
mov rcx, qword [r10 + 0x48]
mov qword [r10 + 0xa8], r8
mov edx, dword [r8 + 0x30]
mov r8, qword [r8 + 8]
dec edx
imul rdx, qword [r10 + 0xc8]
mov r9, qword [rcx]
call qword [r9 + 0x90]
jmp 0x140086012
mov rcx, r8
call fcn.140069650
add rsi, rbp
test ebx, ebx
je 0x140085f64
jmp 0x1400860ce
mov rax, qword [r15]
lea rdx, [rsp + 0x38]
mov rcx, r15
call qword [rax + Ordinal_50]
mov ebx, eax
test eax, eax
jne 0x14008604b
cmp qword [rsp + 0x38], r12
jle 0x14008604b
mov rax, qword [r15]
mov rdx, r12
mov rcx, r15
call qword [rax + reloc.WLDAP32.dll_Ordinal_32]
mov ebx, eax
test ebx, ebx
jne 0x1400860ce
mov rcx, qword [r13 + 0x48]
mov rax, qword [rcx]
test rax, rax
je 0x140086076
xor r8d, r8d
mov edx, reloc.WS2_32.dll_setsockopt
call qword [rax + 0x50]
xor ebx, ebx
cmp eax, 0xc
cmovne ebx, eax
test ebx, ebx
jne 0x1400860ce
cmp byte [r13 + 0xb], 0
jne 0x1400860b3
movzx edx, byte [r13 + 0xe]
mov rcx, qword [r13 + 0x48]
test edx, edx
je 0x140086092
mov rax, qword [rcx]
call qword [rax + Ordinal_41]
jmp 0x1400860b1
xor ebx, ebx
jmp 0x1400860b3
mov eax, r9d
xor r8d, r8d
cdq
idiv ecx
xor edx, edx
mov rcx, r13
imul eax, r14d
mov dword [r13 + 0x20], eax
call fcn.140070120
mov ebx, eax
test ebx, ebx
jne 0x1400860ce
mov rcx, qword [rdi + 8]
xor edx, edx
call fcn.14007a6c0
mov ebx, eax
mov eax, 0x65
test ebx, ebx
cmove ebx, eax
cmp dword [rsp + 0x28], 0
mov r14, qword [rsp + 0x58]
mov r13, qword [rsp + 0x60]
mov r12, qword [rsp + 0x68]
mov rsi, qword [rsp + 0x90]
mov rbp, qword [rsp + 0x88]
je 0x14008610a
mov rcx, qword [rdi + 0x28]
xor edx, edx
call fcn.14007a470
mov rcx, qword [rdi + 0x28]
xor edx, edx
call fcn.14007a6c0
cmp ebx, 0xc0a
mov eax, 7
cmove ebx, eax
mov dword [rdi + 0x30], ebx
mov rax, qword [rdi]
mov r15, qword [rsp + 0x50]
test rax, rax
je 0x140086137
mov rcx, qword [rax + 0x18]
test rcx, rcx
je 0x140086137
call qword [0x1401ecb30]
mov rcx, qword [rdi + 0x28]
cmp byte [rcx + 0x11], 0
je 0x14008614c
sub dword [rcx + 0x14], 1
jne 0x14008614c
call fcn.140075690
mov rax, qword [rdi + 0x20]
mov rdi, qword [rsp + 0x98]
mov rcx, qword [rax + 0x18]
test rcx, rcx
je 0x140086167
call qword [0x1401ecb30]
mov eax, ebx
mov rcx, qword [rsp + 0x40]
xor rcx, rsp
call fcn.1401a2f30
add rsp, 0x70
pop rbx
ret