Function at 0x140007930
Capabilities:
Set socket configuration

Disassembly:
push rbp
push rsi
push r15
lea rbp, [rsp - 0xfe0]
mov eax, 0x10e0
call fcn.1400236c0
sub rsp, rax
mov rax, qword [0x140057c30]
xor rax, rsp
mov qword [rbp + 0xfa0], rax
mov rsi, qword [rbp + 0x1020]
mov r15d, ecx
mov dword [rsp + 0x34], ecx
lea rcx, [0x140055240]
mov qword [rsp + 0x68], r9
mov qword [rsp + 0x58], r8
mov qword [rsp + 0x40], rdx
mov qword [rsp + 0x48], rsi
cmp r15d, 2
jne 0x14000799f
lea rcx, [0x140055210]
call fcn.1400099d0
test eax, eax
je 0x1400079b2
jmp 0x140008262
cmp r15d, 0x17
jne 0x1400079b2
call fcn.1400099d0
test eax, eax
jne 0x140008262
mov qword [rsp + 0x10c8], r12
lea rdx, [0x14005c448]
mov r12d, dword [rbp + 0x1028]
mov r15d, 4
mov qword [rsp + 0x10c0], r13
lea r13d, [r15 + 0xc]
test r12d, r12d
je 0x140007a0d
cmp word [0x14005c440], 0x17
lea rcx, [0x14005c444]
mov r8d, r15d
cmove rcx, rdx
cmove r8d, r13d
mov rdx, qword [0x1400570c0]
call fcn.140024d50
test eax, eax
lea eax, [r15 - 3]
jne 0x140007a13
mov eax, dword [0x1400588c0]
cdqe
mov qword [rsp + 0x10d8], rbx
mov qword [rsp + 0x10d0], rdi
mov qword [rsp + 0x10b8], r14
mov qword [rsp + 0x60], rax
test rax, rax
jle 0x140008238
lea rax, [0x140058750]
mov qword [rsp + 0x50], 0
mov qword [rsp + 0x38], rax
lea rdi, [rbp - 0x6e]
test rsi, rsi
je 0x140007a65
lea rbx, [rsi + 0x1b0]
test r12d, r12d
je 0x140007a6a
lea rbx, [rsp + 0x70]
test rsi, rsi
je 0x140007a7b
lea r14, [rsi + 0x1cc]
test r12d, r12d
je 0x140007a80
lea r14, [rsp + 0x70]
xor eax, eax
mov qword [rbx], rax
mov qword [rbx + 8], rax
mov qword [rbx + 0x10], rax
mov dword [rbx + 0x18], eax
mov qword [r14], rax
mov qword [r14 + 8], rax
mov qword [r14 + 0x10], rax
mov dword [r14 + 0x18], eax
test r12d, r12d
je 0x140007aed
movzx esi, word [0x14005c440]
lea rax, [0x14005c448]
mov rdx, qword [0x1400570c0]
lea rcx, [0x14005c444]
cmp si, 0x17
mov r8, r15
cmove r8, r13
cmove rcx, rax
call fcn.140024d50
test eax, eax
je 0x140007aed
mov r13d, dword [0x14005c45c]
movzx r9d, si
mov word [rbx], si
mov rsi, qword [rsp + 0x38]
jmp 0x140007afe
mov rsi, qword [rsp + 0x38]
movzx r9d, word [rsi]
mov r13d, dword [rsi + 0x1c]
mov word [rbx], r9w
test r13d, r13d
mov eax, 6
mov r8d, reloc.WS2_32.dll_recvfrom
mov ecx, 2
cmovne r8d, eax
mov eax, r13d
neg eax
mov eax, reloc.WS2_32.dll_socket
sbb edx, edx
add edx, 2
cmp r9w, 0x17
cmove ecx, eax
call qword [0x1400570d0]
mov r15, rax
cmp rax, 0xffffffffffffffff
je 0x140008238
cmp word [rbx], 0x17
mov r8d, reloc.WS2_32.dll_recv
mov eax, SQLFreeHandle
mov rdx, rbx
cmove r8d, eax
mov rcx, r15
call qword [0x1400570e0]
test eax, eax
jne 0x140008221
lea ebx, [rax + 0x10]
test r12d, r12d
je 0x140007bc3
cmp word [0x14005c440], 0x17
lea rax, [0x14005c448]
mov rdx, qword [0x1400570c0]
lea rcx, [0x14005c444]
mov r8d, 4
cmove rcx, rax
cmove r8d, ebx
call fcn.140024d50
test eax, eax
je 0x140007bc3
movups xmm0, xmmword [0x14005c440]
movups xmmword [r14], xmm0
movsd xmm1, qword [0x14005c450]
movsd qword [r14 + 0x10], xmm1
mov eax, dword [0x14005c458]
jmp 0x140007bd8
movups xmm0, xmmword [rsi]
movups xmmword [r14], xmm0
movsd xmm1, qword [rsi + 0x10]
movsd qword [r14 + 0x10], xmm1
mov eax, dword [rsi + 0x18]
mov dword [r14 + 0x18], eax
test r13d, r13d
je 0x140007c2e
cmp word [r14], 0x17
mov eax, SQLFreeHandle
mov r8d, ebx
mov rdx, r14
cmove r8d, eax
mov rcx, r15
lea r9d, [rax - 0x14]
call fcn.14001a870
mov rcx, r15
test eax, eax
jne 0x140008224
lea r9, [rsp + 0x30]
mov dword [rsp + 0x30], 1
lea edx, [rax + 6]
mov dword [rsp + 0x20], 4
lea r8d, [rax + 1]
call qword [sym.imp.WS2_32.dll_setsockopt]
mov rax, qword [rsp + 0x40]
or rsi, 0xffffffffffffffff
inc rsi
cmp byte [rax + rsi], 0
jne 0x140007c37
mov edx, esi
mov rcx, rax
call fcn.14001a940
mov rdx, qword [rsp + 0x40]
lea rcx, [rbp - 0x61]
mov r12d, eax
mov dword [rsp + 0x30], eax
mov word [rbp - 0x6e], ax
mov eax, 0xff
cmp esi, eax
mov qword [rbp - 0x6c], 0x1000001
mov word [rbp - 0x64], 0
cmovg esi, eax
movsxd rbx, esi
mov r8, rbx
call fcn.140024730
mov byte [rbp + rbx - 0x61], 0
lea rcx, [rbp - 0x61]
mov edx, 0x2e
lea rbx, [rbp - 0x62]
add esi, 0xd
call fcn.140024490
lea rcx, [rbp - 0x62]
test rax, rax
je 0x140007cdc
nop dword [rax]
nop dword [rax + rax]
movzx ecx, al
mov edx, 0x2e
sub cl, bl
movzx r12d, al
dec cl
mov byte [rbx], cl
lea rcx, [rax + 1]
mov rbx, rax
call fcn.140024490
test rax, rax
jne 0x140007cb0
movzx ecx, r12b
mov r12d, dword [rsp + 0x30]
movzx eax, sil
inc esi
sub al, cl
dec al
add al, dil
mov byte [rbx], al
movsxd rax, esi
inc esi
cmp dword [rbp + 0x1028], 1
mov byte [rbp + rax - 0x6e], 0
jne 0x140007d05
mov ecx, ntohs
jmp 0x140007d17
cmp dword [rsp + 0x34], 0x17
mov ecx, 1
mov eax, SQLFreeHandle
cmove ecx, eax
movsxd rax, esi
inc esi
mov byte [rbp + rax - 0x6e], cl
movsxd rax, esi
inc esi
mov byte [rbp + rax - 0x6e], 0
movsxd rax, esi
inc esi
mov byte [rbp + rax - 0x6e], 1
test r13d, r13d
je 0x140007d4d
movzx ecx, si
lea rdi, [rbp - 0x70]
call qword [sym.imp.WS2_32.dll_htons]
mov word [rbp - 0x70], ax
add esi, 2
imul eax, dword [reloc.WS2_32.dll_getpeername], 0x3e8
mov r9d, esi
mov r8, rdi
mov rdx, r14
mov rcx, r15
mov dword [rsp + 0x20], eax
call fcn.140019110
cmp eax, esi
je 0x140007dc2
mov edx, 2
mov rcx, r15
call qword [0x140057140]
mov rcx, r15
call qword [0x140057148]
mov r13d, reloc.WS2_32.dll_recv
mov rcx, qword [rsp + 0x50]
add qword [rsp + 0x38], 0x20
inc rcx
mov qword [rsp + 0x50], rcx
cmp rcx, qword [rsp + 0x60]
jge 0x140008238
mov rsi, qword [rsp + 0x48]
mov r15d, 4
mov r12d, dword [rbp + 0x1028]
jmp 0x140007a50
mov rbx, qword [rsp + 0x48]
test rbx, rbx
je 0x140007dd6
movsxd rax, esi
add qword [rbx + 0x208], rax
imul eax, dword [reloc.WS2_32.dll_ntohs], 0x3e8
mov r9d, 0x1000
mov r8, rdi
mov rdx, r14
mov rcx, r15
mov dword [rsp + 0x20], eax
call fcn.140019230
mov edx, 2
movsxd rsi, eax
mov rcx, r15
call qword [0x140057140]
mov rcx, r15
call qword [0x140057148]
cmp esi, 0xd
jle 0x140007d87
test rbx, rbx
je 0x140007e27
add qword [rbx + 0x210], rsi
test r13d, r13d
je 0x140007e83
movzx ecx, word [rdi]
call qword [sym.imp.WS2_32.dll_ntohs]
mov ecx, 0x1000
sub esi, 2
add rdi, 2
cmp ax, cx
ja 0x140007d87
movzx ebx, ax
cmp ebx, esi
jl 0x140007d87
jle 0x140007e83
imul eax, dword [reloc.WS2_32.dll_ntohs], 0x3e8
sub ebx, esi
movsxd r8, esi
mov r9d, ebx
add r8, rdi
mov rdx, r14
mov rcx, r15
mov dword [rsp + 0x20], eax
call fcn.140019230
cmp eax, ebx
jne 0x140007d87
cmp word [rdi], r12w
jne 0x140007d87
movzx r8d, byte [rdi + 6]
mov r9d, pe_nt_image_headers64
movzx eax, byte [rdi + 7]
movzx ecx, r9w
imul r8d, ecx
add r8w, ax
cmp r8w, 1
jb 0x140008238
movzx edx, byte [rdi + 4]
movzx eax, byte [rdi + 5]
movzx ecx, r9w
imul edx, ecx
add dx, ax
cmp dx, 1
jne 0x140007d87
mov edx, reloc.WS2_32.dll_listen
cmp esi, edx
jle 0x140007eee
lea rax, [rdi + 0xd]
nop dword [rax]
cmp byte [rax], 0
je 0x140007eee
inc edx
inc rax
cmp edx, esi
jl 0x140007ee0
add edx, 5
cmp edx, esi
jge 0x140007d87
mov r9d, 0xff
cmp r8w, r9w
jbe 0x140007f09
movzx r8d, r9w
xor r10d, r10d
movzx r14d, r8w
lea r13d, [r10 + 0x10]
test r14d, r14d
je 0x140007d8d
mov r15d, dword [rsp + 0x34]
lea r12d, [r10 + 4]
cmp r15d, 0x17
mov r11d, r13d
mov eax, SQLFreeHandle
cmove r11d, eax
nop word [rax + rax]
movsxd rax, edx
movzx eax, byte [rax + rdi]
cmp al, 0xc0
jae 0x140007f72
nop dword [rax + rax]
test al, al
je 0x140007f72
movzx r8d, al
lea eax, [rdx + 0xe]
add eax, r8d
cmp eax, esi
jge 0x140007f72
inc edx
add edx, r8d
movsxd rax, edx
movzx eax, byte [rax + rdi]
cmp al, 0xc0
jb 0x140007f50
movsxd rax, edx
lea r8d, [rdx - 1]
cmp byte [rax + rdi], 0
cmovne r8d, edx
lea eax, [r11 + r8]
cmp eax, esi
jg 0x140007d8d
movsxd rbx, r8d
lea edx, [r8 + 0xc]
movzx r9d, byte [rbx + rdi + 0xa]
movzx eax, byte [rbx + rdi + 0xb]
shl r9d, 8
add r9d, eax
add edx, r9d
cmp edx, esi
jg 0x140007d8d
cmp dword [rbp + 0x1028], 1
je 0x140008125
cmp byte [rbx + rdi + 2], 0
jne 0x140008133
movzx ecx, byte [rbx + rdi + 3]
cmp r15d, 0x17
mov eax, 1
mov r8d, SQLFreeHandle
cmove eax, r8d
cmp ecx, eax
jne 0x140008133
cmp r15d, 0x17
mov eax, r12d
cmove eax, r13d
cmp r9d, eax
jne 0x140008133
mov ecx, dword [rbx + rdi + 6]
call qword [sym.imp.WS2_32.dll_ntohl]
cmp r15d, 0x17
lea rdx, [rdi + 0xc]
mov esi, eax
cmove r12, r13
add rdx, rbx
mov r8, r12
mov r12, qword [rsp + 0x58]
mov rcx, r12
call fcn.140024730
lea ecx, [rsi - 0x3c]
mov eax, 0x12c
cmp ecx, 0xa884
lea r14, [0x140055210]
lea rcx, [0x14005a140]
cmova esi, eax
lea rax, [0x140055240]
mov edi, esi
add rdi, qword [0x140057330]
cmp r15d, 0x17
cmove r14, rax
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
test r12, r12
je 0x140008177
mov rcx, qword [rsp + 0x40]
test rcx, rcx
je 0x140008177
cmp qword [r14 + 0x18], 0
je 0x140008177
mov rbx, qword [r14 + 0x28]
test rbx, rbx
je 0x140008177
mov rax, qword [rbx + 0x18]
lea r8, [r14 + 8]
mov rdx, rbx
mov qword [r14 + 0x28], rax
call fcn.140009850
mov r8d, dword [r14 + 4]
lea rcx, [rbx + 0x20]
mov rdx, r12
call fcn.140024730
mov qword [rbx + 0x10], rdi
xor edx, edx
xor r9d, r9d
mov qword [rbx + 0x18], r9
imul ecx, dword [rbx + 8], 0x11
imul eax, dword [rbx + 0xc], 0x1d
add eax, ecx
imul ecx, dword [rbx + 4], 7
add eax, ecx
mov ecx, dword [r14]
add eax, dword [rbx]
shr ecx, 2
div ecx
mov rax, qword [r14 + 0x18]
lea r8, [rdx*8]
mov rcx, qword [rax + r8]
lea rdx, [rax + r8]
test rcx, rcx
je 0x140008167
nop dword [rax + rax]
mov rax, qword [0x140057330]
cmp qword [rcx + 0x10], rax
jl 0x140008144
mov rax, qword [rbx]
cmp rax, qword [rcx]
jne 0x14000811f
mov rax, qword [rbx + 8]
cmp rax, qword [rcx + 8]
je 0x140008144
lea rdx, [rcx + 0x18]
jmp 0x14000815b
cmp byte [rbx + rdi + 2], 0
jne 0x140008133
cmp byte [rbx + rdi + 3], 0xc
je 0x14000819a
inc r10d
cmp r10d, r14d
jl 0x140007f40
jmp 0x140007d8d
mov rax, qword [rcx + 0x18]
mov qword [rdx], rax
mov qword [rcx + 0x10], r9
mov rax, qword [r14 + 0x28]
mov qword [rcx + 0x18], rax
mov qword [r14 + 0x28], rcx
mov rcx, qword [rdx]
test rcx, rcx
jne 0x140008100
mov rax, qword [r14 + 0x18]
mov rax, qword [rax + r8]
mov qword [rbx + 0x18], rax
mov rax, qword [r14 + 0x18]
mov qword [r8 + rax], rbx
lea rcx, [0x14005a140]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov rcx, qword [rsp + 0x68]
test rcx, rcx
je 0x140008190
mov dword [rcx], esi
mov eax, 1
jmp 0x14000823a
movsxd rax, esi
lea rdx, [rdi + 0xc]
add rax, rbx
lea r8, [rdi + 0xc]
add r8, rax
add rdx, rbx
cmp rdx, r8
jae 0x1400081cf
movzx eax, byte [rdx]
test al, al
je 0x1400081cf
lea rcx, [rdx + 1]
movzx eax, al
add rcx, rax
mov byte [rdx], 0x2e
mov rdx, rcx
cmp rcx, r8
jb 0x1400081b3
mov rsi, qword [rsp + 0x48]
mov byte [rdx], 0
mov rcx, qword [rsi + 0x118]
test rcx, rcx
je 0x1400081e8
call fcn.1400292f8
lea rcx, [rdi + 0xd]
add rcx, rbx
call fcn.140031e4c
mov r8, qword [rsp + 0x58]
xor r9d, r9d
mov rdx, rax
mov dword [rsp + 0x28], 2
mov ecx, r15d
mov qword [rsi + 0x118], rax
mov qword [rsp + 0x20], 0
call fcn.140007930
jmp 0x14000823a
mov rcx, r15
mov edx, 2
call qword [0x140057140]
mov rcx, r15
call qword [0x140057148]
xor eax, eax
mov rbx, qword [rsp + 0x10d8]
mov rdi, qword [rsp + 0x10d0]
mov r14, qword [rsp + 0x10b8]
mov r12, qword [rsp + 0x10c8]
mov r13, qword [rsp + 0x10c0]
mov rcx, qword [rbp + 0xfa0]
xor rcx, rsp
call fcn.140023730
add rsp, 0x10e0
pop r15
pop rsi
pop rbp
ret