Function at 0x42b510
Capabilities:
Check for time delay via gettickcount
Reference sql statements

Disassembly:
mov eax, dword [0x476ecf4]
sub esp, 0x888
test eax, eax
push ebx
push ebp
push esi
push edi
je 0x42b530
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x888
ret
lea eax, [esp + 0x70]
push 0
lea ecx, [esp + 0x6c]
push eax
lea edx, [esp + 0x5c]
push ecx
lea eax, [esp + 0x6c]
push edx
lea ecx, [esp + 0x74]
push eax
lea edx, [esp + 0x80]
push ecx
lea eax, [esp + 0x70]
push edx
lea ecx, [esp + 0x78]
push eax
push ecx
call fcn.004265e0
add esp, 0x24
test eax, eax
jne 0x42b574
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x888
ret
mov edi, dword [esp + 0x8a8]
lea edx, [edi + 8]
push edx
call fcn.0045a970
add edi, 0xa
mov esi, eax
push edi
call fcn.0045a970
add esp, 8
xor ecx, ecx
cmp esi, 0x80
mov edx, esi
setge cl
and edx, 0x8000007f
mov ebp, ecx
jns 0x42b5ae
dec edx
or edx, 0xffffff80
inc edx
xor ebx, ebx
cmp edx, 0x40
mov ecx, esi
setge bl
and ecx, 0x8000003f
mov dword [esp + 0x50], ebx
jns 0x42b5c9
dec ecx
or ecx, 0xffffffc0
inc ecx
xor edx, edx
cmp ecx, 0x20
mov ecx, esi
setge dl
and ecx, reloc.ODBC32.dll_SQLFreeHandle
mov dword [esp + 0x18], edx
jns 0x42b5e4
dec ecx
or ecx, 0xffffffe0
inc ecx
xor edx, edx
cmp ecx, 0x10
mov ecx, esi
setge dl
and ecx, 0x8000000f
mov dword [esp + 0x20], edx
jns 0x42b5ff
dec ecx
or ecx, 0xfffffff0
inc ecx
xor edx, edx
cmp ecx, 8
mov ecx, esi
setge dl
and ecx, 0x80000007
mov dword [esp + 0x28], edx
jns 0x42b61a
dec ecx
or ecx, 0xfffffff8
inc ecx
xor edx, edx
cmp ecx, 4
mov ecx, esi
setge dl
and ecx, reloc.WSOCK32.dll_closesocket
mov dword [esp + 0x30], edx
jns 0x42b635
dec ecx
or ecx, 0xfffffffc
inc ecx
xor edx, edx
cmp ecx, 2
setge dl
and esi, reloc.WSOCK32.dll_accept
mov dword [esp + 0x38], edx
jns 0x42b64e
dec esi
or esi, 0xfffffffe
inc esi
xor ecx, ecx
cmp esi, 1
setge cl
xor edx, edx
mov dword [esp + 0x40], ecx
cmp eax, 0x80
mov ecx, eax
setge dl
and ecx, 0x8000007f
mov dword [esp + 0x44], edx
jns 0x42b677
dec ecx
or ecx, 0xffffff80
inc ecx
xor edx, edx
cmp ecx, 0x40
mov ecx, eax
setge dl
and ecx, 0x8000003f
mov dword [esp + 0x24], edx
jns 0x42b692
dec ecx
or ecx, 0xffffffc0
inc ecx
xor edx, edx
cmp ecx, 0x20
mov ecx, eax
setge dl
and ecx, reloc.ODBC32.dll_SQLFreeHandle
mov dword [esp + 0x3c], edx
jns 0x42b6ad
dec ecx
or ecx, 0xffffffe0
inc ecx
xor edx, edx
cmp ecx, 0x10
mov ecx, eax
setge dl
and ecx, 0x8000000f
mov dword [esp + 0x2c], edx
jns 0x42b6c8
dec ecx
or ecx, 0xfffffff0
inc ecx
xor edx, edx
cmp ecx, 8
mov ecx, eax
setge dl
and ecx, 0x80000007
mov dword [esp + 0x4c], edx
jns 0x42b6e3
dec ecx
or ecx, 0xfffffff8
inc ecx
xor edx, edx
cmp ecx, 4
mov ecx, eax
setge dl
and ecx, reloc.WSOCK32.dll_closesocket
mov dword [esp + 0x10], edx
jns 0x42b6fe
dec ecx
or ecx, 0xfffffffc
inc ecx
xor edx, edx
cmp ecx, 2
setge dl
and eax, reloc.WSOCK32.dll_accept
mov dword [esp + 0x14], edx
jns 0x42b716
dec eax
or eax, 0xfffffffe
inc eax
xor ecx, ecx
cmp eax, 1
setge cl
push 0x46054d8
mov dword [esp + 0x38], ecx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ecx, dword [0x516f90]
mov edx, dword [ecx]
call dword [edx + 0x14]
mov eax, dword [esp + 0x8a4]
cmp eax, 1
mov eax, dword [esp + 0x89c]
lea ecx, [eax + eax*2]
jne 0x42b80b
lea ecx, [ecx + ecx*8]
lea ecx, [eax + ecx*8]
lea edx, [ecx + ecx*2]
lea ecx, [eax + edx*2]
mov edx, dword [esp + 0x8a0]
lea ecx, [ecx + ecx*4]
lea esi, [edx + ecx*8]
lea ecx, [eax + eax*2]
shl esi, 2
lea ecx, [ecx + ecx*8]
lea ecx, [eax + ecx*8]
lea edx, [ecx + ecx*2]
mov ecx, dword [esi + 0x643948]
push ecx
lea eax, [eax + edx*2]
lea eax, [eax + eax*4]
shl eax, 5
mov edx, dword [eax + 0x643944]
lea edi, [eax + 0x643944]
mov eax, dword [0x476edd0]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov edx, dword [esp + 0x50]
lea ecx, [esp + 0x7c]
push eax
mov eax, dword [esp + 0x34]
push ecx
mov ecx, dword [esp + 0x50]
push edx
mov edx, dword [esp + 0x44]
push eax
mov eax, dword [esp + 0x68]
push ecx
mov ecx, dword [esp + 0x30]
push edx
mov edx, dword [esp + 0x38]
push eax
mov eax, dword [esp + 0x5c]
push ecx
mov ecx, dword [esp + 0x44]
push edx
mov edx, dword [esp + 0x50]
push eax
mov eax, dword [esp + 0x5c]
push ebp
push ebx
push ecx
mov ecx, dword [esp + 0x70]
push edx
mov edx, dword [esp + 0x7c]
push eax
mov eax, dword [esp + 0x88]
push ecx
push edx
push eax
push 0x476ed38
lea ecx, [esp + 0xf0]
push str.UPDATE_GATC__sDIDOSERIALE_SET_dido1in1_d_dido1in2_d_dido1in3_d_dido1in4_d_dido1in5_d_dido1in6_d_dido1in7_d_dido1in8_d_dido1out1_d_dido1out2_d_dido1out3_d_dido1out4_d_dido1out5_d_dido1out6_d_dido1out7_d_dido1out8_d_datora1_s_cpccchk_010lu_WHERE_kcom_d_AND_channel_d_AND_device_d
push ecx
jmp 0x42b8c3
lea edx, [ecx + ecx*8]
lea ecx, [eax + edx*8]
lea ecx, [ecx + ecx*2]
lea ecx, [eax + ecx*2]
lea edx, [ecx + ecx*4]
mov ecx, dword [esp + 0x8a0]
lea esi, [ecx + edx*8]
lea ecx, [eax + eax*2]
shl esi, 2
lea edx, [ecx + ecx*8]
lea ecx, [eax + edx*8]
lea ecx, [ecx + ecx*2]
lea eax, [eax + ecx*2]
lea edx, [eax + eax*4]
mov eax, dword [esi + 0x643948]
shl edx, 5
push eax
mov ecx, dword [edx + 0x643944]
lea edi, [edx + 0x643944]
mov edx, dword [0x476edd0]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, dword [esp + 0x50]
mov edx, dword [esp + 0x30]
push eax
lea eax, [esp + 0x80]
push eax
mov eax, dword [esp + 0x50]
push ecx
mov ecx, dword [esp + 0x44]
push edx
mov edx, dword [esp + 0x68]
push eax
mov eax, dword [esp + 0x30]
push ecx
mov ecx, dword [esp + 0x38]
push edx
mov edx, dword [esp + 0x5c]
push eax
mov eax, dword [esp + 0x44]
push ecx
mov ecx, dword [esp + 0x50]
push edx
mov edx, dword [esp + 0x5c]
push ebp
push ebx
push eax
mov eax, dword [esp + 0x70]
push ecx
mov ecx, dword [esp + 0x7c]
push edx
mov edx, dword [esp + 0x88]
push eax
push ecx
push edx
push 0x476ed38
lea eax, [esp + 0xf0]
push str.UPDATE_GATC__sDIDOSERIALE_SET_dido2in1_d_dido2in2_d_dido2in3_d_dido2in4_d_dido2in5_d_dido2in6_d_dido2in7_d_dido2in8_d_dido2out1_d_dido2out2_d_dido2out3_d_dido2out4_d_dido2out5_d_dido2out6_d_dido2out7_d_dido2out8_d_datora2_s_cpccchk_010lu_WHERE_kcom_d_AND_channel_d_AND_device_d
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x60
lea edx, [esp + 0x98]
sub esp, 0x10
mov ecx, esp
mov dword [esp + 0x2c], esp
push edx
call fcn.00445210
mov ecx, dword [0x516f90]
mov eax, dword [ecx]
call dword [eax + 0x10]
xor ebx, ebx
cmp eax, 1
sete bl
test ebx, ebx
mov dword [esp + 0x48], ebx
je 0x42baad
mov eax, dword [esp + 0x8a4]
cmp eax, 1
jne 0x42b91c
mov ecx, dword [esi + 0x656dfc]
test ecx, ecx
jne 0x42b933
jmp 0x42ba9c
cmp eax, 2
jne 0x42ba9c
mov ecx, dword [esi + 0x656e7c]
test ecx, ecx
je 0x42ba9c
mov ecx, dword [esi + 0x643948]
mov edx, dword [edi]
push eax
mov eax, dword [0x476edd0]
push ecx
push edx
push eax
push 0x476ed38
lea ecx, [esp + 0xac]
push str.SELECT_MAX_idlogs__FROM_GATG__sLOGSIO_WHERE_kcom_d_AND_channel_d_AND_device_d_AND_didochn_d
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x1c
lea edx, [esp + 0x98]
push 1
sub esp, 0x10
mov ecx, esp
mov dword [esp + 0x30], esp
push edx
call fcn.00445210
mov ecx, dword [0x516f90]
mov eax, dword [ecx]
call dword [eax + 0xc]
mov ebx, eax
xor eax, eax
test ebx, ebx
sete al
test eax, eax
mov dword [esp + 0x1c], ebx
mov dword [0x476ecf4], eax
jne 0x42ba98
mov edx, dword [ebx]
mov ecx, ebx
call dword [edx + 0x24]
test al, al
jne 0x42ba98
mov al, byte [ebx + 4]
test al, al
jne 0x42ba85
mov eax, dword [ebx]
push 1
mov ecx, ebx
call dword [eax + 0x10]
call fcn.0045f9d8
mov ebx, eax
inc ebx
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, dword [esp + 0x44]
mov edx, dword [esp + 0x24]
push eax
mov eax, dword [esp + 0x40]
push ecx
mov ecx, dword [esp + 0x34]
push edx
mov edx, dword [esp + 0x58]
push eax
mov eax, dword [esp + 0x20]
push ecx
mov ecx, dword [esp + 0x28]
push edx
mov edx, dword [esp + 0x4c]
push eax
mov eax, dword [esp + 0x6c]
push ecx
mov ecx, dword [esp + 0x38]
push edx
mov edx, dword [esp + 0x44]
push ebp
push eax
mov eax, dword [esp + 0x54]
push ecx
mov ecx, dword [esp + 0x60]
push edx
mov edx, dword [esp + 0x6c]
push eax
mov eax, dword [esp + 0x78]
push ecx
push edx
mov edx, dword [esp + 0x8e4]
lea ecx, [esp + 0xb0]
push eax
mov eax, dword [esi + 0x643948]
push ecx
mov ecx, dword [edi]
push edx
mov edx, dword [0x476edd0]
push eax
push ecx
push edx
push ebx
push 0x476ed38
lea eax, [esp + 0xf8]
push str.INSERT_INTO_GATG__sLOGSIO__idlogs_kcom_channel_device_didochn_datora_in1_in2_in3_in4_in5_in6_in7_in8_out1_out2_out3_out4_out5_out6_out7_out8_cpccchk__VALUES___d__d__d__d__d__s__d__d__d__d__d__d__d__d__d__d__d__d__d__d__d__d__010lu_
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x58
lea edx, [esp + 0xa8]
mov ecx, esp
mov dword [esp + 0x60], esp
push edx
call fcn.00445210
mov ecx, dword [0x516f90]
mov eax, dword [ecx]
call dword [eax + 0x10]
mov ebx, dword [esp + 0x1c]
xor ecx, ecx
cmp eax, 1
sete cl
mov dword [esp + 0x48], ecx
mov edx, dword [ebx]
mov ecx, ebx
call dword [edx + 0x1c]
test ebx, ebx
je 0x42ba98
mov eax, dword [ebx]
push 1
mov ecx, ebx
call dword [eax]
mov ebx, dword [esp + 0x48]
test ebx, ebx
je 0x42baad
mov ecx, dword [0x516f90]
mov edx, dword [ecx]
call dword [edx + 0x18]
jmp 0x42bab8
mov ecx, dword [0x516f90]
mov eax, dword [ecx]
call dword [eax + 0x1c]
push 0x46054d8
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop edi
pop esi
mov eax, ebx
pop ebp
pop ebx
add esp, 0x888
ret