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

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x148
mov rax, qword [0x14041f880]
xor rax, rsp
mov qword [rsp + 0x130], rax
mov rax, qword [rcx]
xor r10d, r10d
mov rbx, qword [rcx + 0x10]
mov rsi, r8
mov qword [rsp + 0xb0], r8
movzx r13d, r9w
mov word [rsp + 0x30], r9w
mov r8, rdx
mov rax, qword [rax]
mov r12, rcx
mov qword [rsp + 0x48], rax
mov ebp, r10d
mov qword [rsp + 0x78], rdx
mov qword [rsp + 0x90], rcx
mov rax, qword [rax]
mov qword [rsp + 0x70], rax
mov qword [rsp + 0x60], r10
mov qword [rsp + 0x50], r10
mov qword [rsp + 0xa8], rbx
cmp byte [rax + 0x67], r10b
je 0x1402d27a8
lea eax, [r10 + 7]
jmp 0x1402d31a9
mov eax, dword [rbx + 0x38]
movzx edi, word [rbx + 0x18]
mov r8d, dword [r8 + 0x44]
mov r9d, edi
mov dword [rsp + 0x5c], eax
and al, 0x20
neg al
mov qword [rsp + 0x28], rsi
movzx eax, word [rbx + 0x1a]
sbb edx, edx
mov word [rsp + 0x3c], ax
movzx eax, word [rbx + 0x1c]
and edx, 0xfffffe59
add edx, 0x1bf
mov word [rsp + 0x3e], ax
movzx eax, word [rbx + 0x3e]
mov ecx, edx
and ecx, 0xffffffc3
mov word [rsp + 0x42], ax
movzx eax, word [rbx + 0x3c]
test byte [rsi + 0x64], 4
mov word [rsp + 0x40], ax
mov rax, qword [rbx]
cmove ecx, edx
mov rdx, qword [r12 + 8]
mov qword [rsp + 0xa0], rax
movzx eax, word [rbx + 0x16]
mov dword [rsp + 0x20], ecx
lea rcx, [rsp + 0xc0]
mov word [rsp + 0x3a], di
mov word [rsp + 0x32], ax
call fcn.1402d6198
xor r11d, r11d
mov qword [rsp + 0x98], rax
mov word [rbx + 0x12], r11w
mov r15, rax
mov rax, qword [rsi + 0x10]
lea ecx, [r11 + 0xa]
movsx rax, word [rax]
mov word [rsp + 0x5a], ax
cmp ax, cx
jg 0x1402d2861
mov word [rsp + 0x38], r11w
jmp 0x1402d2872
mov rcx, rax
call fcn.1402a4eb0
sub ax, 0x21
mov word [rsp + 0x38], ax
mov edx, 2
mov ecx, 0x100
lea r8d, [rdx + 0xe]
lea r9d, [rdx - 1]
test r15, r15
je 0x1402d3088
movzx r13d, word [r15 + 0x14]
mov r14d, r11d
mov eax, dword [r12 + 0x28]
mov word [rsp + 0x58], r13w
mov dword [rsp + 0x34], r11d
mov dword [rsp + 0x88], eax
cmp r13w, cx
je 0x1402d28b9
test byte [r15 + 0x12], 0x80
je 0x1402d2900
mov rax, qword [rsi + 8]
movzx ecx, di
movsx r8, word [rax + rcx*2]
test r8d, r8d
js 0x1402d28eb
mov rdx, qword [rsi + 0x18]
lea rcx, [r8 + r8*2]
mov rax, qword [rdx + 8]
test dword [rax + rcx*8 + 8], 0xf
jne 0x1402d3040
mov edx, 2
jmp 0x1402d28f5
cmp r8d, 0xffffffff
je 0x1402d3040
mov r8d, reloc.WS2_32.dll_recv
mov ecx, 0x100
mov rax, qword [r15 + 0x28]
test qword [rbx + 8], rax
jne 0x1402d3040
test word [r15 + 0x12], cx
je 0x1402d291f
cmp r13w, r8w
je 0x1402d3040
mov rax, qword [rsp + 0x78]
test byte [rax + 0x3c], 8
je 0x1402d2937
mov rax, qword [r15]
test byte [rax + 4], r9b
je 0x1402d3040
cmp byte [rsi + 0x62], r11b
je 0x1402d2952
movzx eax, word [rsi + 0x5e]
sub eax, r9d
movzx ecx, di
cmp ecx, eax
jne 0x1402d2952
or byte [r12 + 0x2c], dl
jmp 0x1402d2957
or byte [r12 + 0x2c], r9b
mov eax, dword [rsp + 0x5c]
mov rdx, rbx
mov rcx, qword [rsp + 0x70]
mov dword [rbx + 0x38], eax
movzx eax, word [rsp + 0x3c]
mov word [rbx + 0x1a], ax
movzx eax, word [rsp + 0x3e]
mov word [rbx + 0x1c], ax
movzx eax, word [rsp + 0x40]
mov word [rbx + 0x18], di
mov word [rbx + 0x3c], ax
lea r8d, [r9 + rax]
call fcn.1402d4614
xor r11d, r11d
test eax, eax
jne 0x1402d307c
movzx ecx, word [rbx + 0x3c]
lea r8d, [r11 + 1]
mov rax, qword [rbx + 0x48]
mov qword [rax + rcx*8], r15
movzx edx, word [rbx + 0x3c]
mov rcx, qword [rsp + 0xa0]
add dx, r8w
mov rax, qword [rbx + 8]
mov word [rbx + 0x3c], dx
not rax
or rcx, qword [r15 + 0x28]
and rcx, rax
mov qword [rbx], rcx
test r8b, r13b
je 0x1402d2afd
mov r8, qword [r15]
test dword [r8 + 4], 0x800
je 0x1402d2a1a
movzx ecx, dx
lea r14d, [r11 + 0x2e]
dec ecx
mov dword [rsp + 0x34], r14d
test ecx, ecx
jle 0x1402d2a39
mov rax, qword [rbx + 0x48]
lea r9d, [r11 + 1]
mov edx, ecx
mov rcx, qword [rax]
test rcx, rcx
je 0x1402d2a0f
cmp qword [rcx], r8
cmove r14d, r11d
add rax, 8
sub rdx, r9
jne 0x1402d2a00
jmp 0x1402d2a34
mov rax, qword [r8 + 0x20]
test rax, rax
je 0x1402d2a39
cmp dword [rax], r11d
je 0x1402d2a39
movsxd rcx, dword [rax]
call fcn.1402a4eb0
movsx r14d, ax
mov dword [rsp + 0x34], r14d
test byte [rsi + 0x64], 0x80
je 0x1402d2ab9
movzx r10d, word [rsp + 0x38]
mov edx, 0xa
cmp r10w, dx
jl 0x1402d2ab9
mov rax, qword [rsi + 0x10]
movzx ecx, di
movzx r9d, word [rax + rcx*2]
cmp r14w, dx
jg 0x1402d2a68
movzx eax, r11w
jmp 0x1402d2a7a
movsx rcx, r14w
call fcn.1402a4eb0
sub ax, 0x21
mov edx, 0xa
sub ax, r14w
sub ax, r10w
add ax, r9w
movzx r9d, word [rsp + 0x30]
add ax, dx
jns 0x1402d2abf
mov eax, 2
cmp r9w, ax
jge 0x1402d303a
mov rax, qword [rsp + 0x70]
test dword [rax + 0x60], 0x20000
jne 0x1402d303a
bts dword [rbx + 0x38], 0x14
jmp 0x1402d2abf
movzx r9d, word [rsp + 0x30]
or dword [rbx + 0x38], 4
mov r8d, 1
mov rax, qword [rsp + 0x50]
mov r14, qword [rsp + 0x60]
mov rbp, qword [rsp + 0x48]
test byte [rbx + 0x38], 2
je 0x1402d2cc0
mov r9, r14
mov qword [rsp + 0x20], rbx
mov r8, rax
mov rdx, r12
mov rcx, rbp
call fcn.1402d5898
jmp 0x1402d2f4e
test r13b, 0x82
je 0x1402d2b93
mov rax, qword [rsi + 8]
mov ebp, 1
mov edx, dword [rbx + 0x38]
movzx r9d, word [rsp + 0x30]
or edx, ebp
movzx ecx, di
movsx r8d, word [rax + rcx*2]
mov dword [rbx + 0x38], edx
cmp r8d, 0xffffffff
je 0x1402d2b6d
mov ecx, edx
test r8d, r8d
js 0x1402d2b76
test r9w, r9w
jne 0x1402d2b76
movzx r8d, word [rsi + 0x5e]
mov eax, r8d
movzx r10d, di
sub eax, ebp
cmp r10d, eax
jne 0x1402d2b76
test byte [rsi + 0x64], 8
jne 0x1402d2b6d
cmp r8w, bp
jne 0x1402d2b67
cmp byte [rsi + 0x62], r11b
je 0x1402d2b67
lea eax, [rbp + 1]
cmp r13w, ax
je 0x1402d2b6d
bts ecx, 0x10
jmp 0x1402d2b73
mov ecx, edx
bts ecx, 0xc
mov dword [rbx + 0x38], ecx
mov r8, rbp
cmp byte [rsp + 0xe9], r8b
jbe 0x1402d2ac9
bts ecx, 0x15
mov dword [rbx + 0x38], ecx
jmp 0x1402d2ac9
bt r13w, 8
mov eax, dword [rbx + 0x38]
jae 0x1402d2baf
movzx r9d, word [rsp + 0x30]
or eax, 8
mov dword [rbx + 0x38], eax
jmp 0x1402d2ac9
movzx r9d, di
mov r8, rsi
mov qword [rsp + 0x20], r15
test r13b, 0x24
je 0x1402d2c59
mov rcx, qword [rsp + 0x48]
or eax, 0x22
mov dword [rbx + 0x38], eax
mov rax, qword [rsp + 0x78]
mov edx, dword [rax + 0x44]
call fcn.1402d5ff4
xor r11d, r11d
mov word [rbx + 0x1a], ax
mov ecx, 0x100
mov qword [rsp + 0x60], r11
mov rax, r15
mov r14d, r11d
mov qword [rsp + 0x50], rax
test word [r15 + 0x12], cx
je 0x1402d2caf
movzx r8d, word [rbx + 0x3c]
lea r14, [r15 + 0x38]
mov rcx, qword [rsp + 0x70]
inc r8d
mov rdx, rbx
mov qword [rsp + 0x60], r14
call fcn.1402d4614
xor r11d, r11d
test eax, eax
jne 0x1402d307c
movzx ecx, word [rbx + 0x3c]
lea r8d, [r11 + 1]
mov rax, qword [rbx + 0x48]
movzx r9d, word [rsp + 0x30]
mov qword [rax + rcx*8], r14
mov rax, r15
add word [rbx + 0x3c], r8w
or dword [rbx + 0x38], 0x10
mov word [rbx + 0x1c], r8w
jmp 0x1402d2ad3
mov rbp, qword [rsp + 0x48]
or eax, 0x12
mov dword [rbx + 0x38], eax
mov rcx, rbp
mov rax, qword [rsp + 0x78]
mov edx, dword [rax + 0x44]
call fcn.1402d5ff4
movzx r9d, word [rsp + 0x30]
xor r11d, r11d
test byte [rbx + 0x38], 0x20
mov r14, r15
mov word [rbx + 0x1c], ax
mov qword [rsp + 0x60], r15
lea r8d, [r11 + 1]
je 0x1402d2caa
movzx ecx, word [rbx + 0x3c]
mov rax, qword [rbx + 0x48]
mov rax, qword [rax + rcx*8 - 0x10]
mov qword [rsp + 0x50], rax
jmp 0x1402d2ad8
mov rax, r11
jmp 0x1402d2ca0
movzx r9d, word [rsp + 0x30]
mov r8d, 1
jmp 0x1402d2ad3
movzx eax, word [rbx + 0x18]
add ax, r8w
movzx r14d, ax
mov word [rbx + 0x18], r14w
movzx edx, word [r15 + 0x10]
mov dword [rsp + 0x68], r14d
test dx, dx
jg 0x1402d2d00
mov rax, qword [rsi + 8]
movzx ecx, di
cmp word [rax + rcx*2], r11w
jl 0x1402d2d00
mov r14d, dword [rsp + 0x34]
sub dx, r14w
add word [rbx + 0x16], dx
jmp 0x1402d2f53
mov dword [rsp + 0x84], r11d
mov dword [rsp + 0x44], r11d
test r9w, r9w
jne 0x1402d2f22
cmp dword [rsi + 0x68], r11d
je 0x1402d2f22
cmp r14d, dword [rsi + 0x6c]
jg 0x1402d2f22
test r8b, r13b
je 0x1402d2d40
mov rax, qword [r15]
test dword [rax + 4], 0x800
jne 0x1402d2f22
mov rax, qword [rsp + 0x70]
test dword [rax + 0x60], 0x800
jne 0x1402d2f22
mov rax, qword [r15]
mov ecx, 0x182
test cx, r13w
je 0x1402d2d82
mov r8, qword [rax + 0x18]
lea r9, [rsp + 0x44]
mov rdx, r12
mov rcx, rbp
call fcn.1402d19f8
mov edi, dword [rsp + 0x44]
mov ecx, eax
xor r11d, r11d
jmp 0x1402d2e47
mov r13, qword [rax + 0x20]
mov rax, qword [r12 + 0x10]
mov rcx, qword [rax + 0x20]
mov rcx, qword [rcx + 0x10]
movzx ecx, word [rcx]
call fcn.1402a5020
mov rsi, qword [rsp + 0x90]
lea rbx, [r13 + 8]
mov rdi, qword [rsp + 0x48]
mov r12, rax
mov ecx, r11d
mov r14d, r11d
mov r15d, r11d
mov ebp, r12d
mov eax, dword [rsi + 0x28]
mov dword [rsp + 0x80], eax
cmp r15d, dword [r13]
jge 0x1402d2e05
mov r8, qword [rbx]
lea r9, [rsp + 0x44]
mov rdx, rsi
mov dword [rsp + 0x44], r12d
mov rcx, rdi
mov ebp, r12d
call fcn.1402d19f8
add r14d, dword [rsp + 0x44]
mov ecx, eax
mov eax, dword [rsp + 0x80]
xor r11d, r11d
inc r15d
mov dword [rsi + 0x28], eax
add rbx, 0x20
test ecx, ecx
je 0x1402d2dc5
mov rbx, qword [rsp + 0xa8]
mov rsi, qword [rsp + 0xb0]
mov edi, dword [rsp + 0x84]
test ecx, ecx
jne 0x1402d2e2c
mov eax, r14d
mov edi, ebp
cmp rax, r12
cmovle edi, r14d
mov r14d, dword [rsp + 0x68]
mov r15, qword [rsp + 0x98]
mov r12, qword [rsp + 0x90]
movzx r13d, word [rsp + 0x58]
cmp ecx, 0xc
mov ebp, r11d
cmovne ebp, ecx
test ebp, ebp
jne 0x1402d307c
test edi, edi
je 0x1402d2f22
mov eax, edi
lea r8d, [rbp + 0x28]
movzx ecx, r8w
cmp rax, 8
jae 0x1402d2e8b
cmp rax, 2
jae 0x1402d2e7c
movzx ecx, r11w
jmp 0x1402d2ec8
add cx, 0xfff6
add rax, rax
cmp rax, 8
jb 0x1402d2e7c
jmp 0x1402d2eb6
mov edx, 0xff
jmp 0x1402d2e9a
add cx, r8w
shr rax, 4
cmp rax, rdx
ja 0x1402d2e92
cmp rax, 0xf
jbe 0x1402d2eb6
mov edx, 0xa
add cx, dx
shr rax, 1
cmp rax, 0xf
ja 0x1402d2eaa
and eax, 7
lea rdx, [0x14041ae70]
sub cx, 0xa
add cx, word [rdx + rax*2]
mov eax, 1
mov word [rbx + 0x16], cx
cmp r14w, ax
jne 0x1402d2f04
mov rax, qword [rsi + 0x10]
movsx edx, cx
add edx, 0xa
movsx ecx, word [rax]
cmp edx, ecx
jle 0x1402d2f04
mov eax, 0x4000
or ax, word [r15 + 0x12]
bt ax, 0xd
mov word [r15 + 0x12], ax
jae 0x1402d2f04
or byte [r12 + 0x2d], 4
movzx eax, word [rbx + 0x16]
cmp ax, word [rsp + 0x32]
mov r14d, dword [rsp + 0x34]
cmovg ax, word [rsp + 0x32]
sub ax, r14w
mov word [rbx + 0x16], ax
jmp 0x1402d2f53
mov rax, qword [rsi + 0x10]
movzx ecx, r14w
movzx edx, word [rax + rcx*2]
sub dx, word [rax + rcx*2 - 2]
add dx, word [rbx + 0x16]
bt r13w, 8
mov word [rbx + 0x16], dx
movzx eax, dx
jae 0x1402d2f4e
add ax, 0xa
mov word [rbx + 0x16], ax
mov r14d, dword [rsp + 0x34]
movsx eax, word [rsi + 0x5c]
mov r15, qword [rsp + 0x78]
movzx edi, word [rbx + 0x16]
imul eax, eax, 0xf
mov rcx, qword [r15 + 0x20]
cdq
movsx r8d, word [rcx + 0x3c]
movzx ecx, word [rsp + 0x38]
idiv r8d
lea edx, [rdi + rax]
inc dx
call fcn.1402a4f10
test dword [rbx + 0x38], 0x140
movzx ecx, ax
jne 0x1402d2f9b
mov edx, reloc.WS2_32.dll_recv
add edx, edi
call fcn.1402a4f10
movzx ecx, ax
movzx r13d, word [rsp + 0x30]
add cx, r14w
movzx r8d, word [rsp + 0x5a]
add cx, r13w
mov word [rbx + 0x14], cx
mov rdx, rbx
lea eax, [r14 + r13]
add ax, di
mov word [rbx + 0x16], ax
mov rcx, qword [r12 + 8]
call fcn.1402d4460
mov rdx, rbx
mov rcx, r12
call fcn.1402d41dc
mov ecx, dword [rbx + 0x38]
mov edx, 2
test dl, cl
mov ebp, eax
cmovne di, word [rsp + 0x32]
lea eax, [rdx + 0xe]
mov word [rbx + 0x16], di
test al, cl
jne 0x1402d301e
movzx ecx, word [rbx + 0x18]
cmp cx, word [rsi + 0x60]
jae 0x1402d301e
cmp cx, word [rsi + 0x5e]
jb 0x1402d300c
mov eax, dword [rsi + 0x64]
and al, 3
cmp al, dl
je 0x1402d301e
lea r9d, [r14 + r13]
mov r8, rsi
mov rdx, r15
mov rcx, r12
call fcn.1402d271c
movzx ecx, word [rsp + 0x32]
mov eax, dword [rsp + 0x88]
movzx edi, word [rsp + 0x3a]
mov word [rbx + 0x16], cx
mov dword [r12 + 0x28], eax
jmp 0x1402d3046
movzx r13d, r9w
jmp 0x1402d3046
movzx r13d, word [rsp + 0x30]
lea rcx, [rsp + 0xc0]
call fcn.1402d628c
xor r11d, r11d
mov qword [rsp + 0x98], rax
mov r15, rax
mov ecx, 0x100
lea edx, [r11 + 2]
lea r9d, [r11 + 1]
lea r8d, [r11 + 0x10]
test ebp, ebp
je 0x1402d2884
jmp 0x1402d3088
movzx r13d, word [rsp + 0x30]
mov r9d, 1
mov rax, qword [rsp + 0xa0]
movzx r14d, word [rsp + 0x3a]
movzx r15d, word [rsp + 0x32]
movzx edx, word [rsp + 0x40]
mov ecx, dword [rsp + 0x5c]
mov qword [rbx], rax
movzx eax, word [rsp + 0x3c]
mov word [rbx + 0x1a], ax
movzx eax, word [rsp + 0x3e]
mov word [rbx + 0x1c], ax
movzx eax, word [rsp + 0x42]
mov word [rbx + 0x18], r14w
mov word [rbx + 0x3e], ax
mov dword [rbx + 0x38], ecx
mov word [rbx + 0x16], r15w
mov word [rbx + 0x3c], dx
cmp r14w, ax
jne 0x1402d31a7
movzx ecx, word [rsi + 0x5e]
lea eax, [r9 + r14]
cmp eax, ecx
jae 0x1402d31a7
cmp r14w, dx
jne 0x1402d31a7
test byte [rsi + 0x64], 0x40
jne 0x1402d31a7
test byte [rsi + 0x64], 0x80
je 0x1402d31a7
mov rcx, qword [rsp + 0x70]
test dword [rcx + 0x60], 0x4000
jne 0x1402d31a7
mov rax, qword [rsi + 0x10]
cmp word [rax + r14*2 + 2], 0x2a
jl 0x1402d31a7
lea r8d, [r9 + rdx]
mov rdx, rbx
call fcn.1402d4614
xor r10d, r10d
mov ebp, eax
test eax, eax
jne 0x1402d31a7
movzx ecx, word [rbx + 0x3c]
lea edx, [rax + 1]
add word [rbx + 0x18], dx
mov r8, rsi
add word [rbx + 0x3e], dx
mov rax, qword [rbx + 0x48]
mov qword [rax + rcx*8], r10
mov rcx, r12
add word [rbx + 0x3c], dx
bts dword [rbx + 0x38], 0xf
mov rax, qword [rsi + 0x10]
mov rdx, qword [rsp + 0x78]
movzx r9d, word [rax + r14*2]
sub r9w, word [rax + r14*2 + 2]
sub word [rbx + 0x16], r9w
add r9w, 5
add r9w, r13w
call fcn.1402d271c
movzx eax, word [rsp + 0x42]
mov word [rbx + 0x3e], ax
mov eax, dword [rsp + 0x5c]
mov dword [rbx + 0x38], eax
mov word [rbx + 0x16], r15w
mov word [rbx + 0x18], r14w
mov eax, ebp
mov rcx, qword [rsp + 0x130]
xor rcx, rsp
call fcn.1402dd7d0
add rsp, 0x148
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret