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

Disassembly:
push 0xffffffffffffffff
push 0x17f21d6
mov eax, dword fs:[0]
push eax
sub esp, 0x380
mov eax, dword [0x1845170]
xor eax, esp
mov dword [esp + 0x37c], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x1845170]
xor eax, esp
push eax
lea eax, [esp + 0x394]
mov dword fs:[0], eax
mov edi, dword [esp + 0x3a4]
mov eax, dword [esp + 0x3ac]
mov ecx, dword [esp + 0x3bc]
mov ebp, dword [esp + 0x3b8]
xor ebx, ebx
cmp edi, ebx
mov dword [esp + 0x38], edi
mov dword [esp + 0x1c], eax
mov dword [esp + 0x18], ecx
jne 0x178a0de
call fcn.0176dcc0
mov eax, dword [esp + 0x3a8]
cmp eax, 0xffffffff
je 0x178a533
push eax
mov ecx, edi
call fcn.01787850
test eax, eax
je 0x178a533
mov ax, word [esp + 0x3b0]
cmp ax, 0xffff
jne 0x178a118
call fcn.0176dcc0
mov esi, str.Error
jmp 0x178a137
cmp ax, 1
jne 0x178a125
mov esi, str.Info
jmp 0x178a137
cmp ax, 0xffff
jne 0x178a132
mov esi, str.Error
jmp 0x178a137
mov esi, 0x180fca8
mov eax, esi
mov dword [esp + 0x5c], 0xf
mov dword [esp + 0x58], ebx
mov byte [esp + 0x48], bl
lea ecx, [eax + 1]
lea esp, [esp]
mov dl, byte [eax]
add eax, 1
cmp dl, bl
jne 0x178a150
sub eax, ecx
push eax
push esi
lea ecx, [esp + 0x4c]
call fcn.01667500
mov dword [esp + 0x39c], ebx
push 0x200
lea edx, [esp + 0x191]
push ebx
push edx
xor esi, esi
mov byte [esp + 0x88], bl
mov dword [esp + 0x89], ebx
mov byte [esp + 0x8d], bl
mov byte [esp + 0x198], bl
call fcn.017b03e0
add esp, 0xc
push 0x186d274
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
push 0x7fffff9b
push 1
push 0x186d274
call dword [sym.imp.KERNEL32.dll_InterlockedCompareExchange]
mov eax, dword [esp + 0x3a8]
push eax
mov ecx, edi
call fcn.017878c0
movzx ecx, word [eax + 8]
lea edx, [esp + 0x60]
mov dword [esp + 0x14], ecx
push edx
mov ecx, edi
call fcn.01789670
mov byte [esp + 0x39c], 1
cmp dword [esp + 0x5c], 0x10
mov eax, dword [esp + 0x48]
jae 0x178a1f8
lea eax, [esp + 0x48]
mov edx, dword [esp + 0x18]
movsx ecx, word [esp + 0x14]
push edx
mov edx, dword [esp + 0x20]
push edx
movsx edx, word [esp + 0x3b8]
push edx
push ebx
push ecx
mov dword [esp + 0x34], ecx
mov ecx, dword [0x186d274]
push ecx
push eax
push str.Query___5s____UniqueID_:__05d_SPID_:__04d_RecNum_:__02d_Result_:__d_Function_:__s_Query_:__s
push 0x2000001
call fcn.0177bbe0
mov edx, dword [esp + 0x3cc]
add esp, 0x24
push edx
mov ecx, edi
call fcn.017878c0
mov ecx, 0x10
cmp dword [eax + 0x28], ecx
jb 0x178a24e
mov eax, dword [eax + 0x14]
jmp 0x178a251
add eax, 0x14
cmp dword [esp + 0x78], ecx
mov edx, dword [esp + 0x64]
jae 0x178a25f
lea edx, [esp + 0x64]
cmp dword [esp + 0x5c], ecx
mov ecx, dword [esp + 0x48]
jae 0x178a26d
lea ecx, [esp + 0x48]
push eax
mov eax, dword [esp + 0x24]
push edx
mov edx, dword [0x186d274]
push ebx
push eax
push edx
push ecx
push str.Query___5s____UniqueID_:__05d_SPID_:__04d_RecNum_:__02d_Desc_:__Database:__s__Session:__s_
push 0x2000001
call fcn.0177bbe0
mov edi, dword [esp + 0x3d4]
add esp, 0x20
lea eax, [esp + 0x40]
push eax
push 0x201
lea ecx, [esp + 0x194]
push ecx
lea edx, [esp + 0x34]
push edx
lea eax, [esp + 0x8c]
push eax
add esi, 1
push esi
push ebp
push edi
mov dword [esp + 0x48], ebx
mov dword [esp + 0x60], ebx
call sub.ODBC32.dll_SQLGetDiagRec
movzx eax, ax
cmp ax, 0x64
je 0x178a485
push 0x80
lea ecx, [esp + 0x89]
push ebx
push ecx
mov dword [esp + 0x20], ebx
mov dword [esp + 0x24], ebx
mov dword [esp + 0x28], ebx
mov dword [esp + 0x30], ebx
mov dword [esp + 0x38], ebx
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x48], ebx
mov byte [esp + 0x90], bl
call fcn.017b03e0
push 0x80
lea edx, [esp + 0x119]
push ebx
push edx
mov byte [esp + 0x120], bl
call fcn.017b03e0
add esp, 0x18
push ebx
push 0xfffffffffffffffa
lea eax, [esp + 0x1c]
push eax
push 0xfffffb21
push esi
push ebp
push edi
call sub.ODBC32.dll_SQLGetDiagField
push ebx
push 0xfffffffffffffffa
lea ecx, [esp + 0x20]
push ecx
push 0xfffffb20
push esi
push ebp
push edi
call sub.ODBC32.dll_SQLGetDiagField
push ebx
push 0xfffffffffffffffa
lea edx, [esp + 0x24]
push edx
push 0xfffffb7e
push esi
push ebp
push edi
call sub.ODBC32.dll_SQLGetDiagField
push ebx
push 0xfffffffffffffffa
lea eax, [esp + 0x2c]
push eax
push 0xfffffb82
push esi
push ebp
push edi
call sub.ODBC32.dll_SQLGetDiagField
push ebx
push 0xfffffffffffffffa
lea ecx, [esp + 0x34]
push ecx
push 0xfffffb81
push esi
push ebp
push edi
call sub.ODBC32.dll_SQLGetDiagField
lea edx, [esp + 0x30]
push edx
push 0x81
lea eax, [esp + 0x8c]
push eax
push 0xfffffb7f
push esi
push ebp
push edi
call sub.ODBC32.dll_SQLGetDiagField
lea ecx, [esp + 0x3c]
push ecx
push 0x81
lea edx, [esp + 0x110]
push edx
push 0xfffffb80
push esi
push ebp
push edi
call sub.ODBC32.dll_SQLGetDiagField
cmp dword [esp + 0x5c], 0x10
movzx eax, ax
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0x48]
jae 0x178a3e5
lea eax, [esp + 0x48]
lea edx, [esp + 0x18c]
push edx
mov edx, dword [esp + 0x2c]
push edx
movsx ecx, si
lea edx, [esp + 0x84]
push edx
mov edx, dword [0x186d274]
push ecx
mov ecx, dword [esp + 0x30]
push ecx
push edx
push eax
push str.Query___5s____UniqueID_:__05d_SPID_:__04d_RecNum_:__02d_State_:__s_Error_:__05lX_Message_:__s
push 0x2000001
call fcn.0177bbe0
mov eax, dword [esp + 0x6c]
add esp, 0x24
cmp dword [esp + 0x5c], 0x10
jae 0x178a42c
lea eax, [esp + 0x48]
lea ecx, [esp + 0x108]
push ecx
mov ecx, dword [esp + 0x30]
lea edx, [esp + 0x88]
push edx
mov edx, dword [esp + 0x2c]
push ecx
movzx ecx, word [esp + 0x28]
push edx
mov edx, dword [esp + 0x28]
push ecx
mov ecx, dword [esp + 0x28]
push edx
mov edx, dword [esp + 0x38]
push ecx
movsx ecx, si
push ecx
mov ecx, dword [0x186d274]
push edx
push ecx
push eax
push str.Query___5s____UniqueID_:__05d_SPID_:__04d_RecNum_:__02d_ColumnNum_:__d_RowNum_:__d_Line_:__d_State_:__d_Severity_:__d_Proc_:__s_Srv_:__s
push 0x2000001
call fcn.0177bbe0
add esp, 0x34
cmp word [esp + 0x34], 0x64
jne 0x178a296
mov esi, dword [sym.imp.KERNEL32.dll_lstrcmpiA]
push str.08S01
lea edx, [esp + 0x80]
push edx
call esi
test eax, eax
jne 0x178a4c1
push str.Database_Connection_was_lost____Server_should_be_shut_down____
push 0x2000001
call fcn.0177bbe0
mov eax, dword [esp + 0x3b0]
mov ecx, dword [esp + 0x40]
add esp, 8
push eax
call fcn.01789a00
push 0x180f960
lea ecx, [esp + 0x190]
push ecx
call esi
test eax, eax
jne 0x178a4d9
call fcn.0176dcc0
mov byte [esp + 0x39c], bl
mov edi, 0x10
cmp dword [esp + 0x78], edi
jb 0x178a4f8
mov edx, dword [esp + 0x64]
push edx
call fcn.017af9e0
add esp, 4
mov esi, 0xf
mov dword [esp + 0x78], esi
mov dword [esp + 0x74], ebx
mov byte [esp + 0x64], bl
mov dword [esp + 0x39c], 0xffffffff
cmp dword [esp + 0x5c], edi
jb 0x178a527
mov eax, dword [esp + 0x48]
push eax
call fcn.017af9e0
add esp, 4
mov dword [esp + 0x5c], esi
mov dword [esp + 0x58], ebx
mov byte [esp + 0x48], bl
mov ecx, dword [esp + 0x394]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x37c]
xor ecx, esp
call fcn.017b0193
add esp, 0x38c
ret