Function at 0x1800188d0
Capabilities:
Link many functions at runtime

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov qword [rax + 0x18], rsi
push rdi
sub rsp, 0x80
xor ebp, ebp
movzx esi, r8w
mov rbx, rdx
cmp qword [0x1800290a8], rbp
mov rdi, rcx
mov dword [rax + 0x20], ebp
jne 0x180018925
mov ecx, 0x1994
call qword [sym.imp.msvcrt.dll_void____ptr64___cdecl_operator_new_unsigned_long_long_unsigned___int64__]
test rax, rax
je 0x18001891e
mov dword [rax + 0x1990], ebp
mov qword [0x1800290a8], rax
jmp 0x180018925
mov qword [0x1800290a8], rbp
lea rdx, [rsp + 0xa8]
mov rcx, rbx
call fcn.180017850
test eax, eax
je 0x180018951
lea rdx, [rsp + 0xa8]
mov rcx, rbx
call fcn.180016da0
test eax, eax
jne 0x180018bd0
mov eax, 2
mov word [rsp + 0x70], ax
mov eax, dword [rsp + 0xa8]
mov dword [rsp + 0x74], eax
mov rax, qword [0x18002a6c0]
test rax, rax
jne 0x1800189a9
mov rax, qword [0x18002a6a8]
test rax, rax
jne 0x180018992
lea rcx, str.ws2_32
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov qword [0x18002a6a8], rax
lea rdx, str.htons
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x18002a6c0], rax
movzx ecx, si
call rax
mov rbx, qword [rdi + 0x88]
mov word [rsp + 0x72], ax
mov rax, qword [0x18002a928]
test rax, rax
jne 0x1800189fd
mov rax, qword [0x18002a6a8]
test rax, rax
jne 0x1800189e6
lea rcx, str.ws2_32
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov qword [0x18002a6a8], rax
lea rdx, str.connect
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x18002a928], rax
lea rdx, [rsp + 0x70]
mov r8d, SQLNumResultCols
mov rcx, rbx
call rax
test eax, eax
je 0x180018a5b
mov rax, qword [0x18002a8d0]
test rax, rax
jne 0x180018a54
mov rax, qword [0x18002a6a8]
test rax, rax
jne 0x180018a3d
lea rcx, str.ws2_32
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov qword [0x18002a6a8], rax
lea rdx, str.WSAGetLastError
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x18002a8d0], rax
call rax
jmp 0x180018bd0
mov rax, qword [0x18002a918]
mov rbx, qword [rdi + 0x88]
mov esi, 1
mov dword [rsp + 0x54], esi
test rax, rax
jne 0x180018aae
mov rax, qword [0x18002a6a8]
test rax, rax
jne 0x180018a97
lea rcx, str.ws2_32
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov qword [0x18002a6a8], rax
lea rdx, str.setsockopt
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x18002a918], rax
lea r9, [rsp + 0x54]
mov edx, 0xffff
mov r8d, 8
mov rcx, rbx
mov dword [rsp + 0x20], 4
call rax
mov rax, qword [0x18002a948]
mov rbx, qword [rdi + 0x88]
mov dword [rsp + 0x60], esi
mov dword [rsp + 0x64], 0xea60
mov dword [rsp + 0x68], 0x1388
mov dword [rsp + 0x58], ebp
test rax, rax
jne 0x180018b2d
mov rax, qword [0x18002a6a8]
test rax, rax
jne 0x180018b16
lea rcx, str.ws2_32
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov qword [0x18002a6a8], rax
lea rdx, [0x180024708]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x18002a948], rax
mov qword [rsp + 0x40], rbp
mov qword [rsp + 0x38], rbp
lea rcx, [rsp + 0x58]
mov qword [rsp + 0x30], rcx
lea r8, [rsp + 0x60]
mov r9d, SQLFetch
mov rcx, rbx
mov edx, 0x98000004
mov dword [rsp + 0x28], ebp
mov qword [rsp + 0x20], rbp
call rax
mov rax, qword [0x18002a918]
mov rbx, qword [rdi + 0x88]
mov dword [rsp + 0x50], 0xa0001
test rax, rax
jne 0x180018bb1
mov rax, qword [0x18002a6a8]
test rax, rax
jne 0x180018b9a
lea rcx, str.ws2_32
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov qword [0x18002a6a8], rax
lea rdx, str.setsockopt
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x18002a918], rax
lea r9, [rsp + 0x50]
mov edx, 0xffff
mov r8d, 0x80
mov rcx, rbx
mov dword [rsp + 0x20], 4
call rax
xor eax, eax
lea r11, [rsp + 0x80]
mov rbx, qword [r11 + 0x10]
mov rbp, qword [r11 + 0x18]
mov rsi, qword [r11 + 0x20]
mov rsp, r11
pop rdi
ret