Function at 0x42aed0
Capabilities:
Reference sql statements

Disassembly:
mov eax, dword [0x476ecf4]
sub esp, 0x888
test eax, eax
push ebx
push ebp
push esi
push edi
je 0x42aef0
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 + 0x68]
push edx
lea ecx, [esp + 0x70]
push eax
lea edx, [esp + 0x80]
push ecx
lea eax, [esp + 0x7c]
push edx
lea ecx, [esp + 0x74]
push eax
push ecx
call fcn.004265e0
add esp, 0x24
test eax, eax
jne 0x42af34
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x888
ret
mov edi, dword [esp + 0x8a4]
lea edx, [edi + 6]
push edx
call fcn.0045a970
add edi, 8
mov esi, eax
push edi
call fcn.0045a970
add esp, 8
xor ebx, ebx
cmp esi, 0x80
mov ecx, esi
setge bl
and ecx, 0x8000007f
mov dword [esp + 0x34], ebx
jns 0x42af70
dec ecx
or ecx, 0xffffff80
inc ecx
xor edx, edx
cmp ecx, 0x40
mov ecx, esi
setge dl
and ecx, 0x8000003f
mov dword [esp + 0x50], edx
jns 0x42af8b
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 + 0x48], edx
jns 0x42afa6
dec ecx
or ecx, 0xffffffe0
inc ecx
xor edx, edx
cmp ecx, 0x10
mov ecx, esi
setge dl
and ecx, 0x8000000f
mov dword [esp + 0x40], edx
jns 0x42afc1
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 0x42afdc
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 + 0x3c], edx
jns 0x42aff7
dec ecx
or ecx, 0xfffffffc
inc ecx
xor edx, edx
cmp ecx, 2
setge dl
and esi, reloc.WSOCK32.dll_accept
mov dword [esp + 0x44], edx
jns 0x42b010
dec esi
or esi, 0xfffffffe
inc esi
xor ecx, ecx
cmp esi, 1
setge cl
xor edx, edx
mov dword [esp + 0x24], ecx
cmp eax, 0x80
mov ecx, eax
setge dl
and ecx, 0x8000007f
mov dword [esp + 0x2c], edx
jns 0x42b039
dec ecx
or ecx, 0xffffff80
inc ecx
xor edx, edx
cmp ecx, 0x40
mov ecx, eax
setge dl
and ecx, 0x8000003f
mov dword [esp + 0x4c], edx
jns 0x42b054
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 + 0x30], edx
jns 0x42b06f
dec ecx
or ecx, 0xffffffe0
inc ecx
xor edx, edx
cmp ecx, 0x10
mov ecx, eax
setge dl
and ecx, 0x8000000f
mov dword [esp + 0x38], edx
jns 0x42b08a
dec ecx
or ecx, 0xfffffff0
inc ecx
xor edx, edx
cmp ecx, 8
mov ecx, eax
setge dl
and ecx, 0x80000007
mov dword [esp + 0x1c], edx
jns 0x42b0a5
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 + 0x20], edx
jns 0x42b0c0
dec ecx
or ecx, 0xfffffffc
inc ecx
xor edx, edx
cmp ecx, 2
setge dl
and eax, reloc.WSOCK32.dll_accept
mov dword [esp + 0x18], edx
jns 0x42b0d8
dec eax
or eax, 0xfffffffe
inc eax
xor ecx, ecx
cmp eax, 1
setge cl
push 0x46054d8
mov dword [esp + 0x18], ecx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ecx, dword [0x516f90]
mov edx, dword [ecx]
call dword [edx + 0x14]
mov esi, dword [esp + 0x89c]
lea eax, [esi + esi*2]
lea eax, [eax + eax*8]
lea eax, [esi + eax*8]
lea ecx, [eax + eax*2]
lea eax, [esi + ecx*2]
lea edx, [eax + eax*4]
mov eax, dword [esp + 0x8a0]
lea edi, [eax + edx*8]
lea eax, [esi + esi*2]
shl edi, 2
lea ecx, [eax + eax*8]
lea eax, [esi + ecx*8]
mov ecx, dword [edi + 0x643948]
push ecx
lea ecx, [esp + 0x74]
lea edx, [eax + eax*2]
lea eax, [esi + edx*2]
lea eax, [eax + eax*4]
shl eax, 5
mov edx, dword [eax + 0x643944]
lea ebp, [eax + 0x643944]
mov eax, dword [0x476edd0]
push edx
mov edx, dword [esp + 0x2c]
push eax
mov eax, dword [esp + 0x50]
push ecx
mov ecx, dword [esp + 0x4c]
push edx
mov edx, dword [esp + 0x3c]
push eax
mov eax, dword [esp + 0x34]
push ecx
mov ecx, dword [esp + 0x3c]
push edx
mov edx, dword [esp + 0x38]
push eax
mov eax, dword [esp + 0x38]
push ecx
mov ecx, dword [esp + 0x54]
push edx
mov edx, dword [esp + 0x78]
push eax
mov eax, dword [esp + 0x60]
push ecx
mov ecx, dword [esp + 0x6c]
push edx
mov edx, dword [esp + 0x78]
push eax
mov eax, dword [esp + 0x84]
push ecx
mov ecx, dword [esp + 0x90]
push edx
push eax
push ecx
push ebx
push 0x476ed38
lea edx, [esp + 0xec]
push str.UPDATE_GATD__sDEVICE_SET_read230v_d__readchecksum_d__readtimbins_d__readoutofserv_d__readrele1_d__readrele2_d__readrele3_d__readrele4_d__readinput1_d__readinput2_d__readinput3_d__readinput4_d__readbit11_d__readbit10_d__readbit9_d__readbit8_d__dtstatus_s_WHERE_idkcom_d_AND_cntchannel_d_AND_cproword_d
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x4c
lea eax, [esp + 0xa8]
mov ecx, esp
mov dword [esp + 0x20], esp
push eax
call fcn.00445210
mov ecx, dword [0x516f90]
mov edx, dword [ecx]
call dword [edx + 0x10]
xor ebx, ebx
cmp eax, 1
sete bl
test ebx, ebx
je 0x42b36e
mov eax, dword [edi + 0x656d7c]
test eax, eax
je 0x42b35d
mov eax, dword [edi + 0x643948]
mov ecx, dword [ebp]
mov edx, dword [0x476edd0]
push eax
push ecx
push edx
push 0x476ed38
lea eax, [esp + 0xa8]
push str.SELECT_MAX_idlogs__FROM_GATG__sLOGSIO_WHERE_kcom_d_AND_channel_d_AND_device_d_AND_didochn0
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x18
lea edx, [esp + 0x98]
push 1
sub esp, 0x10
mov ecx, esp
mov dword [esp + 0x24], esp
push edx
call fcn.00445210
mov ecx, dword [0x516f90]
mov eax, dword [ecx]
call dword [eax + 0xc]
xor edx, edx
mov dword [esp + 0x10], eax
test eax, eax
sete dl
test edx, edx
mov dword [0x476ecf4], edx
jne 0x42b35d
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0x24]
test al, al
jne 0x42b35d
mov ecx, dword [esp + 0x10]
mov al, byte [ecx + 4]
test al, al
jne 0x42b34a
mov eax, dword [ecx]
push 1
call dword [eax + 0x10]
call fcn.0045f9d8
mov ebx, eax
inc ebx
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x44]
push eax
mov eax, dword [esp + 0x40]
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 ecx
mov ecx, dword [esp + 0x68]
push edx
mov edx, dword [esp + 0x74]
push eax
mov eax, dword [esp + 0x5c]
push ecx
mov ecx, dword [esp + 0x48]
push edx
mov edx, dword [esp + 0x50]
push eax
mov eax, dword [esp + 0x4c]
push ecx
mov ecx, dword [esp + 0x4c]
push edx
push eax
mov eax, dword [edi + 0x643948]
lea edx, [esp + 0xb0]
push ecx
mov ecx, dword [ebp]
push edx
mov edx, dword [0x476edd0]
push eax
push ecx
push edx
push ebx
push 0x476ed38
lea eax, [esp + 0xf4]
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_0__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, 0x54
lea edx, [esp + 0xa8]
mov ecx, esp
mov dword [esp + 0x44], esp
push edx
call fcn.00445210
mov ecx, dword [0x516f90]
mov eax, dword [ecx]
call dword [eax + 0x10]
mov ecx, dword [esp + 0x10]
xor ebx, ebx
cmp eax, 1
sete bl
mov edx, dword [ecx]
call dword [edx + 0x1c]
mov ecx, dword [esp + 0x10]
test ecx, ecx
je 0x42b35d
mov eax, dword [ecx]
push 1
call dword [eax]
test ebx, ebx
je 0x42b36e
mov ecx, dword [0x516f90]
mov edx, dword [ecx]
call dword [edx + 0x18]
jmp 0x42b379
mov ecx, dword [0x516f90]
mov eax, dword [ecx]
call dword [eax + 0x1c]
push 0x46054d8
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
test ebx, ebx
je 0x42b4f5
mov eax, dword [edi + 0x674198]
test eax, eax
jle 0x42b4f5
mov eax, dword [edi + 0x6744d8]
cmp eax, 1
jne 0x42b3c5
mov ecx, dword [esp + 0x14]
test ecx, ecx
mov ecx, dword [edi + 0x674558]
je 0x42b3bd
test ecx, ecx
jne 0x42b45b
jmp 0x42b3c5
test ecx, ecx
je 0x42b45b
cmp eax, 2
jne 0x42b3e2
mov ecx, dword [esp + 0x18]
test ecx, ecx
mov ecx, dword [edi + 0x674558]
je 0x42b3de
test ecx, ecx
jne 0x42b45b
jmp 0x42b3e2
test ecx, ecx
je 0x42b45b
cmp eax, 3
jne 0x42b3ff
mov ecx, dword [esp + 0x20]
test ecx, ecx
mov ecx, dword [edi + 0x674558]
je 0x42b3fb
test ecx, ecx
jne 0x42b45b
jmp 0x42b3ff
test ecx, ecx
je 0x42b45b
cmp eax, 4
jne 0x42b416
mov eax, dword [esp + 0x1c]
test eax, eax
mov eax, dword [edi + 0x674558]
je 0x42b457
test eax, eax
jne 0x42b45b
xor eax, eax
mov dword [edi + 0x6745d8], eax
mov ecx, dword [edi + 0x674758]
test ecx, ecx
je 0x42b462
test eax, eax
jne 0x42b462
mov ebp, dword [esp + 0x8a0]
push eax
push 1
push 0x47481c
push ebp
push esi
call fcn.0042f970
mov ebx, eax
add esp, 0x14
test ebx, ebx
je 0x42b469
mov dword [edi + 0x674758], 0
jmp 0x42b469
test eax, eax
jne 0x42b416
mov eax, 1
jmp 0x42b418
mov ebp, dword [esp + 0x8a0]
mov eax, dword [edi + 0x6747d8]
test eax, eax
je 0x42b4a0
mov eax, dword [edi + 0x6745d8]
test eax, eax
je 0x42b4a0
push 0
push 1
push 0x47481c
push ebp
push esi
call fcn.0042f970
mov ebx, eax
add esp, 0x14
test ebx, ebx
je 0x42b4a0
mov dword [edi + 0x6747d8], 0
mov eax, dword [edi + 0x6748d8]
test eax, eax
je 0x42b4be
mov eax, dword [edi + 0x6745d8]
test eax, eax
jne 0x42b4be
mov dword [edi + 0x6748d8], 0
mov eax, dword [edi + 0x674958]
test eax, eax
je 0x42b4f5
mov eax, dword [edi + 0x6745d8]
test eax, eax
jne 0x42b4f5
push 0
push 1
push 0x47481c
push ebp
push esi
call fcn.0042f970
mov ebx, eax
add esp, 0x14
test ebx, ebx
je 0x42b4f5
mov dword [edi + 0x674958], 0
pop edi
pop esi
mov eax, ebx
pop ebp
pop ebx
add esp, 0x888
ret