Function at 0x4207a0
Capabilities:
Reference sql statements

Disassembly:
mov eax, 0x48cc0
call fcn.0045ec70
mov eax, dword [0x476ecf4]
push ebx
push ebp
push esi
test eax, eax
push edi
je 0x4207c4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x48cc0
ret
mov eax, dword [esp + 0x48cd4]
lea ecx, [eax + eax*2]
lea ecx, [ecx + ecx*8]
lea ecx, [eax + ecx*8]
lea edx, [ecx + ecx*2]
mov ecx, dword [esp + 0x48cd8]
lea eax, [eax + edx*2]
lea eax, [eax + eax*4]
lea edx, [ecx + eax*8]
lea ecx, [esp + 0x68]
mov eax, dword [edx*4 + 0x65937c]
lea edx, [esp + 0x28]
push eax
push ecx
lea eax, [esp + 0x34]
push edx
lea ecx, [esp + 0x2c]
push eax
lea edx, [esp + 0x34]
push ecx
lea eax, [esp + 0x48]
push edx
lea ecx, [esp + 0x50]
push eax
lea edx, [esp + 0x4c]
push ecx
push edx
call fcn.004265e0
add esp, 0x24
test eax, eax
jne 0x42082e
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x48cc0
ret
push 0x46054d8
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [esp + 0x48ce0]
mov ecx, dword [esp + 0x48cdc]
mov ebp, dword [sym.imp.USER32.dll_wsprintfA]
push eax
push ecx
push 0x476ed38
lea edx, [esp + 0x9c]
push str.SELECT_kind_FROM_GATG__sKINDSUBJECT_WHERE_idcompany_s_AND_idsubject_s
push edx
mov dword [esp + 0x30], 0
mov dword [esp + 0x24], 0
call ebp
add esp, 0x14
lea eax, [esp + 0x90]
push 1
sub esp, 0x10
mov ecx, esp
mov dword [esp + 0x2c], esp
push eax
call fcn.00445210
mov ecx, dword [0x516f90]
mov edx, dword [ecx]
call dword [edx + 0xc]
mov ebx, eax
xor eax, eax
test ebx, ebx
sete al
test eax, eax
mov dword [0x476ecf4], eax
jne 0x42091d
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax + 0x24]
test al, al
jne 0x42091d
mov al, byte [ebx + 4]
test al, al
jne 0x42090a
mov edx, dword [ebx]
lea eax, [esp + 0x3c]
push 1
push eax
mov ecx, ebx
call dword [edx + 0x14]
mov eax, dword [eax + 4]
or ecx, 0xffffffff
mov edi, eax
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x16]
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x3c]
call fcn.00445280
lea ecx, [esp + 0x16]
push 0x46e08c
push ecx
call dword [sym.imp.SHLWAPI.dll_StrTrimA]
mov edx, dword [ebx]
mov ecx, ebx
call dword [edx + 0x1c]
test ebx, ebx
je 0x42091d
mov eax, dword [ebx]
push 1
mov ecx, ebx
call dword [eax]
mov ecx, dword [esp + 0x48cec]
mov edx, dword [esp + 0x48ce8]
mov eax, dword [esp + 0x48ce4]
push ecx
mov ecx, dword [esp + 0x48ce4]
push edx
mov edx, dword [esp + 0x48ce4]
push eax
push ecx
push edx
push 0x476ed38
lea eax, [esp + 0xa8]
push str.SELECT_modacc_hextessera_FROM_GATC__sBADGE_WHERE_idcompany_s_AND_idsubject_s_AND_idsystem_s_AND_idticket_s_AND_dtactivat_s
push eax
call ebp
add esp, 0x20
lea edx, [esp + 0x90]
push 1
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 + 0xc]
mov ebx, eax
xor eax, eax
test ebx, ebx
sete al
test eax, eax
mov dword [0x476ecf4], eax
jne 0x420a19
mov edx, dword [ebx]
mov ecx, ebx
call dword [edx + 0x24]
test al, al
jne 0x420a19
mov al, byte [ebx + 4]
test al, al
jne 0x420a06
mov eax, dword [ebx]
push 1
mov ecx, ebx
call dword [eax + 0x10]
call fcn.0045f9d8
mov edx, dword [ebx]
mov dword [esp + 0x10], eax
lea eax, [esp + 0x3c]
push 2
push eax
mov ecx, ebx
call dword [edx + 0x14]
mov eax, dword [eax + 4]
or ecx, 0xffffffff
mov edi, eax
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x4c]
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x3c]
call fcn.00445280
lea ecx, [esp + 0x4c]
push 0x46e08c
push ecx
call dword [sym.imp.SHLWAPI.dll_StrTrimA]
mov edx, dword [ebx]
mov ecx, ebx
call dword [edx + 0x1c]
test ebx, ebx
je 0x420a19
mov eax, dword [ebx]
push 1
mov ecx, ebx
call dword [eax]
mov esi, 0x47ab48
lea eax, [esp + 0x16]
mov dl, byte [eax]
mov bl, byte [esi]
mov cl, dl
cmp dl, bl
jne 0x420a4a
test cl, cl
je 0x420a46
mov dl, byte [eax + 1]
mov bl, byte [esi + 1]
mov cl, dl
cmp dl, bl
jne 0x420a4a
add eax, 2
add esi, 2
test cl, cl
jne 0x420a22
xor eax, eax
jmp 0x420a4f
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x420e27
mov eax, dword [esp + 0x10]
test eax, eax
jle 0x420e27
mov ecx, dword [0x516f90]
mov eax, dword [ecx]
call dword [eax + 0x14]
mov edi, str.000000000000001
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x58]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 0x476ed38
mov eax, ecx
mov esi, edi
mov edi, edx
push str.SELECT_MAX_idstmt__FROM_GATC__sSTMT
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x98]
push ecx
call ebp
add esp, 0xc
lea edx, [esp + 0x90]
push 1
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 + 0xc]
mov ebx, eax
xor eax, eax
test ebx, ebx
sete al
test eax, eax
mov dword [0x476ecf4], eax
jne 0x420b42
mov edx, dword [ebx]
mov ecx, ebx
call dword [edx + 0x24]
test al, al
jne 0x420b42
mov al, byte [ebx + 4]
test al, al
jne 0x420b2f
mov eax, dword [ebx]
lea ecx, [esp + 0x3c]
push 1
push ecx
mov ecx, ebx
call dword [eax + 0x14]
mov eax, dword [eax + 4]
or ecx, 0xffffffff
mov edi, eax
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x58]
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x3c]
call fcn.00445280
mov edx, dword [ebx]
mov ecx, ebx
call dword [edx + 0x1c]
test ebx, ebx
je 0x420b42
mov eax, dword [ebx]
push 1
mov ecx, ebx
call dword [eax]
mov ecx, dword [esp + 0x10]
lea edx, [esp + 0x90]
push ecx
push 0x476ed38
push 0x476ed38
push 0x476ed38
push 0x476ed38
push 0x476ed38
push 0x476ed38
push 0x476ed38
push 0x476ed38
push 0x476ed38
push 0x476ed38
push 0x476ed38
push 0x476ed38
push 0x476ed38
push str.SELECT_GATC__sMODE.kcom_GATC__sMODE.channel_GATD__sDEVICE.iddevice_FROM_GATC__sMODE_GATD__sDEVICE_WHERE_GATC__sMODE.kcomGATD__sDEVICE.idkcom_AND_GATC__sMODE.channelGATD__sDEVICE.cntchannel_AND_GATC__sMODE.deviceGATD__sDEVICE.cproword_AND_GATD__sDEVICE.statusX_AND_GATC__sMODE.idmode_d
push edx
call ebp
add esp, 0x40
lea eax, [esp + 0x90]
push 1
sub esp, 0x10
mov ecx, esp
mov dword [esp + 0x2c], esp
push eax
call fcn.00445210
mov ecx, dword [0x516f90]
mov edx, dword [ecx]
call dword [edx + 0xc]
mov ebx, eax
xor eax, eax
test ebx, ebx
sete al
test eax, eax
mov dword [0x476ecf4], eax
jne 0x420d9b
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax + 0x24]
test al, al
jne 0x420d9b
mov al, byte [ebx + 4]
xor edi, edi
test al, al
mov dword [esp + 0x10], edi
jne 0x420cde
lea ebp, [esp + 0x890]
jmp 0x420c00
mov edi, dword [esp + 0x10]
cmp edi, 0x3e8
jge 0x420e17
lea ecx, [esp + 0x58]
push ecx
call fcn.0045fb51
fiadd dword [esp + 0x14]
push ecx
fadd qword [0x46b3a0]
fstp qword [esp]
push str._.0f
push ebp
call fcn.0045faff
push 0xf
push ebp
call fcn.0045acd0
mov edx, dword [ebx]
add esp, 0x18
mov ecx, ebx
push 1
call dword [edx + 0x10]
call fcn.0045f9d8
mov dword [ebp + 0x10], eax
mov eax, dword [ebx]
push 2
mov ecx, ebx
call dword [eax + 0x10]
call fcn.0045f9d8
mov dword [ebp + 0x14], eax
mov edx, dword [ebx]
push 3
mov ecx, ebx
call dword [edx + 0x10]
call fcn.0045f9d8
mov dword [ebp + 0x18], eax
mov edi, 0x47aa20
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [ebp + 0x1c]
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [ebp + 0x23]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x4c]
push ecx
push 0x47aa1c
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
mov edx, dword [esp + 0x1c]
add esp, 0xc
mov dword [ebp + 0x124], 2
mov eax, dword [ebx]
inc edx
mov ecx, ebx
mov dword [esp + 0x10], edx
add ebp, 0x128
call dword [eax + 0x20]
mov al, byte [ebx + 4]
test al, al
je 0x420bfc
mov ebp, dword [sym.imp.USER32.dll_wsprintfA]
mov edi, dword [esp + 0x10]
mov edx, dword [ebx]
mov ecx, ebx
call dword [edx + 0x1c]
test ebx, ebx
je 0x420cf1
mov eax, dword [ebx]
push 1
mov ecx, ebx
call dword [eax]
test edi, edi
jle 0x420d9b
lea esi, [esp + 0x8b3]
lea ecx, [esp + 0x28]
lea edx, [esp + 0x2c]
push ecx
lea eax, [esp + 0x24]
push edx
lea ecx, [esp + 0x2c]
push eax
lea edx, [esp + 0x40]
push ecx
lea eax, [esp + 0x48]
push edx
mov edx, dword [esi + 0x101]
lea ecx, [esp + 0x44]
push eax
push ecx
mov ecx, dword [esi - 0xb]
push edx
mov edx, dword [esi - 0xf]
lea eax, [esi - 7]
push esi
push eax
mov eax, dword [esi - 0x13]
push ecx
push edx
lea ecx, [esi - 0x23]
push eax
push ecx
push 0x476ed38
lea edx, [esp + 0xcc]
push str.INSERT_INTO_GATC__sSTMT__idstmt__idkcom__idchn__iddevice__comando__dati__npriority__executing__datora__cpccchk__VALUES___s__d__d__d__s__s__d_0__s_s_s_s_s_s_s_foostrings_
push edx
call ebp
add esp, 0x34
lea eax, [esp + 0xa0]
mov ecx, esp
mov dword [esp + 0x28], esp
push eax
call fcn.00445210
mov ecx, dword [0x516f90]
mov edx, dword [ecx]
call dword [edx + 0x10]
mov eax, dword [esi - 0xb]
mov ecx, dword [esi - 0xf]
mov edx, dword [esi - 0x13]
push eax
mov eax, dword [0x476edd0]
push ecx
push edx
push eax
call fcn.00459540
add esp, 0x10
add esi, 0x128
dec edi
jne 0x420d00
mov ecx, dword [esp + 0x48cec]
mov edx, dword [esp + 0x48ce8]
mov eax, dword [esp + 0x48ce4]
push ecx
mov ecx, dword [esp + 0x48ce4]
push edx
mov edx, dword [esp + 0x48ce4]
push eax
push ecx
push edx
push 0x476ed38
lea eax, [esp + 0xa8]
push str.UPDATE_codd__ssubject15_SET_lgokaccess0_WHERE_idcompany_s_AND_idsubject_s_AND_idsystem_s_AND_idticket_s_AND_dtactivat_s
push eax
call ebp
add esp, 0x10
lea edx, [esp + 0xa0]
mov ecx, esp
mov dword [esp + 0x28], esp
push edx
call fcn.00445210
mov ecx, dword [0x516f90]
mov eax, dword [ecx]
call dword [eax + 0x10]
xor ecx, ecx
cmp eax, 1
sete cl
mov eax, ecx
mov ecx, dword [0x516f90]
test eax, eax
mov dword [esp + 0x1c], eax
je 0x420e22
mov edx, dword [ecx]
call dword [edx + 0x18]
jmp 0x420e27
mov ebp, dword [sym.imp.USER32.dll_wsprintfA]
jmp 0x420cde
mov eax, dword [ecx]
call dword [eax + 0x1c]
push 0x46054d8
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [esp + 0x1c]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x48cc0
ret