Function at 0x14018bc40
Capabilities:
Connect socket
Get socket status

Disassembly:
mov rax, rsp
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rax - 0x2d8]
sub rsp, 0x3b0
mov qword [rsp + 0x58], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
mov rax, qword [0x1403ad830]
xor rax, rsp
mov qword [rbp + 0x2a8], rax
movzx edi, r8b
movzx esi, dl
mov rbx, rcx
lea rdx, [rcx + 0xc0]
lea rcx, [rsp + 0x70]
call fcn.140031dd0
nop
cmp byte [rbx + 0x108], 0
je 0x14018bcbb
test sil, sil
jne 0x14018bcb4
mov esi, 0xfffffffd
jmp 0x14018c66f
mov byte [rbx + 0x108], 0
cmp byte [rbx + 0xa8], 0
je 0x14018bd03
test dil, dil
je 0x14018bcfc
cmp byte [rbx + 0xb0], 0
je 0x14018bce4
mov rcx, rbx
call fcn.14018bae0
mov esi, 0xfffffffe
jmp 0x14018c66f
mov esi, 0xfffffffe
xor r13d, r13d
cmp byte [rbx + 0x109], r13b
cmovne esi, r13d
jmp 0x14018c66f
mov byte [rbx + 0xb0], 0
cmp byte [rbx + 0x109], 0
je 0x14018bd17
xor r13d, r13d
mov esi, r13d
jmp 0x14018c66f
cmp byte [rbx + 0xa4], 0
jne 0x14018bd2c
mov byte [rbx + 0xa4], 1
call fcn.140031c50
mov rcx, rbx
call fcn.14018bae0
call fcn.1400303b0
mov rdx, rax
mov qword [rsp + 0x40], rax
mov rcx, qword [rbx + 0x1d0]
cmp qword [rbx + 0x1c8], rcx
jne 0x14018bd5e
mov rcx, rbx
call fcn.14018b790
mov rdx, qword [rsp + 0x40]
mov rcx, qword [rbx + 0x200]
xor r13d, r13d
movabs r8, 0x6666666666666667
test rcx, rcx
jle 0x14018bde3
add rcx, qword [rbx + 0x1f8]
cmp rcx, rdx
jge 0x14018bde3
mov qword [rbx + 0x200], r13
mov rcx, qword [rbx + 0x1d0]
sub rcx, qword [rbx + 0x1c8]
mov rax, r8
imul rcx
mov rcx, rdx
sar rcx, 4
mov rax, rcx
shr rax, 0x3f
add rcx, rax
mov eax, dword [rbx + 0x1f0]
inc eax
cdqe
xor edx, edx
div rcx
mov dword [rbx + 0x1f0], edx
cmp byte [rbx + 0xa5], r13b
jne 0x14018bdd1
test edx, edx
jne 0x14018bde3
mov rcx, rbx
call fcn.14018b790
movabs r8, 0x6666666666666667
mov rax, qword [rbx + 0x1c8]
mov rcx, qword [rbx + 0x1d0]
cmp rax, rcx
je 0x14018bcda
mov edx, 1
mov qword [rsp + 0x50], rdx
cmp byte [rbx + 0xa5], r13b
je 0x14018be37
sub rcx, rax
mov rax, r8
imul rcx
sar rdx, 4
mov rax, rdx
shr rax, 0x3f
add rdx, rax
mov qword [rsp + 0x50], rdx
mov dword [rbx + 0x1f0], r13d
mov byte [rbx + 0x214], r13b
mov esi, 0xfffffffe
mov edi, esi
mov dword [rsp + 0x34], r13d
test edx, edx
jle 0x14018c464
nop dword [rax + rax]
test edi, edi
je 0x14018c46d
inc dword [rbx + 0x210]
movsxd rax, dword [rbx + 0x1f0]
lea rcx, [rax + rax*4]
mov rax, qword [rbx + 0x1c8]
lea rdx, [rax + rcx*8]
lea rcx, [rbx + 0x68]
call fcn.14001d690
lea rdx, [rbx + 0x68]
lea rcx, [rbp + 0x10]
call fcn.14001c0d0
nop
lea rcx, [rbp - 0x18]
call fcn.14001cac0
nop
xor r15b, r15b
lea rdx, [0x1402d03c4]
lea rcx, [rbp + 0x78]
call fcn.14001c950
nop
xor r8d, r8d
lea rdx, [rbp + 0x78]
lea rcx, [rbx + 0x68]
call fcn.14001f950
mov edi, eax
lea rcx, [rbp + 0x78]
call fcn.14001d440
test edi, edi
js 0x14018c10f
lea rdx, [0x1402d1d24]
lea rcx, [rbp + 0xa0]
call fcn.14001c950
nop
lea r8, [rbp + 0xa0]
lea rdx, [rbp + 0x208]
lea rcx, [rbp + 0x10]
call fcn.140021aa0
nop
mov rdx, rax
lea rcx, [rbp - 0x18]
call fcn.14001d690
nop
lea rcx, [rbp + 0x208]
call fcn.14001d440
nop
lea rcx, [rbp + 0xa0]
call fcn.14001d440
lea rcx, [rbp - 0x18]
call fcn.14001f680
test al, al
jne 0x14018bf68
lea rcx, [rbp - 0x18]
call fcn.140025eb0
test al, al
je 0x14018bf68
lea rcx, [rbp - 0x18]
call fcn.14002a400
mov r12d, eax
lea rcx, [rbp - 0x18]
call fcn.140026e10
lea edx, [rax + 1]
lea rcx, [rbp + 0x10]
call fcn.14001f380
lea rdx, [rbp + 0x10]
lea rcx, [rbx + 0x68]
call fcn.14001d690
jmp 0x14018bf6f
mov r12d, dword [rbx + 0x90]
xor r8d, r8d
lea edx, [r8 + 1]
mov edi, 2
mov ecx, edi
call qword [sym.imp.WS2_32.dll_socket]
mov qword [rbx + 0xf8], rax
cmp rax, 0xffffffffffffffff
je 0x14018c50d
xor eax, eax
mov qword [rbp - 0x48], rax
mov qword [rbp - 0x40], rax
mov word [rbp - 0x48], di
lea rdx, [rbp + 0x38]
lea rcx, [rbp + 0x10]
call fcn.140022ea0
cmp qword [rax + 0x18], 0x10
jb 0x14018bfb9
mov rax, qword [rax]
mov rcx, rax
call qword [sym.imp.WS2_32.dll_inet_addr]
mov dword [rbp - 0x44], eax
mov rdx, qword [rbp + 0x50]
cmp rdx, 0x10
jb 0x14018c000
inc rdx
mov rcx, qword [rbp + 0x38]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14018bffb
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14018c6b1
call fcn.140283144
movzx ecx, r12w
call qword [sym.imp.WS2_32.dll_htons]
mov word [rbp - 0x46], ax
cmp dword [0x1404522e0], 4
jl 0x14018c0f2
lea rdx, str.e:worksuniaccess_unimon_blowsnow_source_smartice_siioclient.cpp
lea rcx, [rbp + 0x118]
call fcn.14001c950
nop
mov r8d, 0xa
mov edx, dword [rbx + 0x90]
lea rcx, [rbp + 0xf0]
call fcn.14001c580
nop
lea rdx, [0x1402d1d24]
lea rcx, [rbp + 0xc8]
call fcn.14001c950
nop
lea rdx, str.connect
lea rcx, [rbp + 0x230]
call fcn.14001c950
nop
lea rdx, [rbx + 0x68]
mov rcx, rax
call fcn.14001d850
mov rcx, rax
lea rdx, [rbp + 0xc8]
call fcn.14001d850
mov rcx, rax
lea rdx, [rbp + 0xf0]
call fcn.14001d850
mov rdx, rax
mov dword [rsp + 0x20], 4
mov r9d, 0x1c5
lea r8, [rbp + 0x118]
lea rcx, [0x1404522e0]
call fcn.140188520
nop
lea rcx, [rbp + 0x230]
call fcn.14001d440
nop
lea rcx, [rbp + 0xc8]
call fcn.14001d440
nop
lea rcx, [rbp + 0xf0]
call fcn.14001d440
nop
lea rcx, [rbp + 0x118]
call fcn.14001d440
mov dl, 1
mov rcx, qword [rbx + 0xf8]
call fcn.14013b0f0
mov r8d, reloc.ODBC32.dll_SQLFreeStmt
lea rdx, [rbp - 0x48]
jmp 0x14018c2bf
mov r15b, 1
mov r12d, dword [rbx + 0x90]
xor r8d, r8d
lea edx, [r8 + 1]
mov edi, reloc.WS2_32.dll_socket
mov ecx, edi
call qword [sym.imp.WS2_32.dll_socket]
mov qword [rbx + 0xf8], rax
cmp rax, 0xffffffffffffffff
je 0x14018c50d
xor eax, eax
mov qword [rbp - 0x38], rax
mov qword [rbp - 0x30], rax
mov qword [rbp - 0x28], rax
mov dword [rbp - 0x20], eax
lea rdx, [rbp + 0x58]
lea rcx, [rbp + 0x10]
call fcn.140022ea0
nop
cmp qword [rax + 0x18], 0x10
jb 0x14018c167
mov rax, qword [rax]
lea r8, [rbp - 0x38]
mov rdx, rax
mov ecx, edi
call fcn.14013ada0
nop
mov rdx, qword [rbp + 0x70]
cmp rdx, 0x10
jb 0x14018c1b1
inc rdx
mov rcx, qword [rbp + 0x58]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14018c1ac
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14018c6ab
call fcn.140283144
mov word [rbp - 0x38], di
movzx ecx, r12w
call qword [sym.imp.WS2_32.dll_htons]
mov word [rbp - 0x36], ax
cmp dword [0x1404522e0], 4
jl 0x14018c2a7
lea rdx, str.e:worksuniaccess_unimon_blowsnow_source_smartice_siioclient.cpp
lea rcx, [rbp + 0x190]
call fcn.14001c950
nop
mov r8d, 0xa
mov edx, dword [rbx + 0x90]
lea rcx, [rbp + 0x168]
call fcn.14001c580
nop
lea rdx, [0x1402d1d24]
lea rcx, [rbp + 0x140]
call fcn.14001c950
nop
lea rdx, str.connect
lea rcx, [rbp + 0x258]
call fcn.14001c950
nop
lea rdx, [rbx + 0x68]
mov rcx, rax
call fcn.14001d850
mov rcx, rax
lea rdx, [rbp + 0x140]
call fcn.14001d850
mov rcx, rax
lea rdx, [rbp + 0x168]
call fcn.14001d850
mov rdx, rax
mov dword [rsp + 0x20], 4
mov r9d, 0x1e1
lea r8, [rbp + 0x190]
lea rcx, [0x1404522e0]
call fcn.140188520
nop
lea rcx, [rbp + 0x258]
call fcn.14001d440
nop
lea rcx, [rbp + 0x140]
call fcn.14001d440
nop
lea rcx, [rbp + 0x168]
call fcn.14001d440
nop
lea rcx, [rbp + 0x190]
call fcn.14001d440
mov dl, 1
mov rcx, qword [rbx + 0xf8]
call fcn.14013b0f0
mov r8d, SQLFreeHandle
lea rdx, [rbp - 0x38]
mov rcx, qword [rbx + 0xf8]
call qword [sym.imp.WS2_32.dll_connect]
mov edi, eax
test eax, eax
je 0x14018c3e2
mov dword [rsp + 0x30], r13d
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [rsp + 0x30], eax
mov dword [rsp + 0x38], 4
cmp eax, 0x2733
jne 0x14018c3e0
lea rcx, [rbx + 0x110]
call fcn.14013b9d0
mov rdx, qword [rbx + 0xf8]
lea rcx, [rbx + 0x110]
call fcn.14013b990
lea rcx, [rbx + 0x110]
call fcn.14013ba50
mov eax, dword [rbx + 0x94]
mov dword [rsp + 0x48], eax
mov dword [rsp + 0x4c], r13d
lea rax, [rsp + 0x48]
mov qword [rsp + 0x20], rax
xor r9d, r9d
mov r8, qword [rbx + 0x128]
xor edx, edx
mov ecx, dword [rbx + 0x130]
call qword [sym.imp.WS2_32.dll_select]
test eax, eax
jle 0x14018c3e0
lea rax, [rsp + 0x38]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x30]
mov edx, 0xffff
mov r8d, 0x1007
mov rcx, qword [rbx + 0xf8]
call qword [sym.imp.WS2_32.dll_getsockopt]
cmp dword [rsp + 0x30], 0
jne 0x14018c3e0
mov edi, r13d
mov rdx, rbx
lea rcx, [rsp + 0x60]
call fcn.140031dd0
nop
lea r14, [rbx + 0x60]
mov ecx, dword [rbx + 0xf8]
mov r8, r14
test r15b, r15b
lea r15, [rbx + 0x38]
mov rdx, r15
jne 0x14018c3bb
call fcn.140138fc0
jmp 0x14018c3c1
call fcn.140139080
nop
lea rcx, [rsp + 0x60]
call fcn.140031f00
lea rdx, [rbx + 0x68]
mov rcx, r15
call fcn.14001d880
test al, al
je 0x14018c3e2
cmp dword [r14], r12d
jne 0x14018c3e2
mov edi, esi
cmp byte [rbx + 0xa5], 0
je 0x14018c439
test edi, edi
je 0x14018c439
mov rcx, qword [rbx + 0x1d0]
sub rcx, qword [rbx + 0x1c8]
movabs rax, 0x6666666666666667
imul rcx
mov rcx, rdx
sar rcx, 4
mov rax, rcx
shr rax, 0x3f
add rcx, rax
mov eax, dword [rbx + 0x1f0]
inc eax
cdqe
xor edx, edx
div rcx
mov dword [rbx + 0x1f0], edx
mov rcx, rbx
call fcn.14018bae0
nop
lea rcx, [rbp - 0x18]
call fcn.14001d440
nop
lea rcx, [rbp + 0x10]
call fcn.14001d440
mov eax, dword [rsp + 0x34]
inc eax
mov dword [rsp + 0x34], eax
cmp eax, dword [rsp + 0x50]
jl 0x14018be50
test edi, edi
je 0x14018c46d
cmp byte [rbx + 0xa5], 0
jne 0x14018c474
mov byte [rbx + 0x214], 1
test edi, edi
jne 0x14018c650
mov byte [rbx + 0xa5], dil
mov qword [rbx + 0x200], r13
cmp byte [rbx + 0xa6], dil
je 0x14018c4a1
mov dl, 1
mov rcx, qword [rbx + 0xf8]
call fcn.14013b0b0
mov edx, dword [rbx + 0xa0]
test edx, edx
jle 0x14018c4b7
mov rcx, qword [rbx + 0xf8]
call fcn.140016110
mov rcx, qword [rbx + 0x198]
test rcx, rcx
je 0x14018c4c8
call fcn.1401985a0
mov byte [rbx + 0x109], 1
mov dl, 1
mov rcx, qword [rbx + 0xf8]
call fcn.140016110
mov dil, 1
cmp qword [rbx + 0x100], 0
jne 0x14018c53e
mov ecx, 0xf0
call fcn.14028314c
mov qword [rsp + 0x40], rax
test rax, rax
je 0x14018c52a
mov edx, 1
mov rcx, rax
call fcn.140214f10
jmp 0x14018c52d
lea rcx, [rbp - 0x18]
call fcn.14001d440
nop
lea rcx, [rbp + 0x10]
call fcn.14001d440
mov esi, 0xfffffffa
jmp 0x14018c66f
mov rax, r13
mov qword [rbx + 0x100], rax
mov qword [rax + 0xd8], rbx
xor dil, dil
cmp dword [0x1404522e0], 4
jl 0x14018c5e1
lea rdx, str.e:worksuniaccess_unimon_blowsnow_source_smartice_siioclient.cpp
lea rcx, [rbp + 0x1e0]
call fcn.14001c950
nop
mov rdx, qword [rbx + 0xf8]
lea rcx, [rbp + 0x1b8]
call fcn.14001cbd0
nop
lea rdx, str.add_fd:
lea rcx, [rbp + 0x280]
call fcn.14001c950
nop
lea rdx, [rbp + 0x1b8]
mov rcx, rax
call fcn.14001d850
mov rdx, rax
mov dword [rsp + 0x20], 4
mov r9d, 0x253
lea r8, [rbp + 0x1e0]
lea rcx, [0x1404522e0]
call fcn.140188520
nop
lea rcx, [rbp + 0x280]
call fcn.14001d440
nop
lea rcx, [rbp + 0x1b8]
call fcn.14001d440
nop
lea rcx, [rbp + 0x1e0]
call fcn.14001d440
mov rdx, qword [rbx + 0xf8]
mov rcx, qword [rbx + 0x100]
call fcn.140215030
test dil, dil
jne 0x14018c64b
xor r8d, r8d
lea rdx, [rbp - 0x80]
mov rcx, qword [rbx + 0x100]
call fcn.140032510
nop
mov rcx, rax
call fcn.140031120
nop
mov rcx, qword [rbp - 0x58]
test rcx, rcx
je 0x14018c641
mov eax, 0xffffffff
lock xadd dword [rcx + 8], eax
cmp eax, 1
jne 0x14018c641
cmp byte [rcx + 0xc], dil
jne 0x14018c641
mov byte [rcx + 0xc], al
mov rax, qword [rcx]
mov edx, 1
call qword [rax]
lea rcx, [rbp - 0x80]
call qword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
mov esi, r13d
jmp 0x14018c66f
cmp qword [rbx + 0x200], 0
jne 0x14018c666
mov rax, qword [rsp + 0x40]
mov qword [rbx + 0x200], rax
mov rcx, rbx
call fcn.14018bae0
nop
lea rcx, [rsp + 0x70]
call fcn.140031f00
mov eax, esi
mov rcx, qword [rbp + 0x2a8]
xor rcx, rsp
call fcn.140283120
lea r11, [rsp + 0x3b0]
mov rbx, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rdi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret
call fcn.140287d84
nop
call fcn.140287d84
int3