Function at 0x413830
Capabilities:
Reference sql statements

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x46a806
push eax
mov eax, dword [0x476ecf4]
mov dword fs:[0], esp
sub esp, 0x864
push ebx
push ebp
xor ebp, ebp
push esi
cmp eax, ebp
push edi
je 0x413861
xor eax, eax
jmp 0x413e03
push 0x46054d8
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov edi, 0x514f20
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x18]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 0x476ed38
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x24]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
push 0x476ed38
rep movsb byte es:[edi], byte [esi]
mov edi, 0x514f20
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 0x476ed38
mov eax, ecx
mov esi, edi
mov edi, edx
push 0x476ed38
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
push 0x476ed38
push 0x476ed38
push 0x476ed38
push 0x476ed38
mov ecx, eax
mov eax, dword [esp + 0x8a8]
push 0x476ed38
push 0x476ed38
and ecx, 3
push 0x476ed38
push 0x476ed38
push eax
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x8b8]
push 0x476ed38
push eax
push 0x476ed38
push ecx
push 0x476ed38
push 0x476ed38
push 0x476ed38
push 0x476ed38
push 0x476ed38
push 0x476ed38
push 0x476ed38
push 0x476ed38
lea edx, [esp + 0xd8]
push str.SELECT_GATC__sBADGE.flnotapb_GATC__sCOMPANY.flnotapb_GATC__sBADGE.idcompany_GATC__sBADGE.idsubject_FROM_GATC__sBADGE_codd__ssubject15_GATC__sCOMPANY_WHERE_GATC__sBADGE.hextessera_s_AND_codd__ssubject15.dtactivat__s_AND_codd__ssubject15.dtexpirat__s_AND_codd__ssubject15.idcompanyGATC__sBADGE.idcompany_AND_codd__ssubject15.idsubjectGATC__sBADGE.idsubject_AND_codd__ssubject15.idsystemGATC__sBADGE.idsystem_AND_codd__ssubject15.idticketGATC__sBADGE.idticket_AND_codd__ssubject15.dtactivatGATC__sBADGE.dtactivat_AND_codd__ssubject15.idcompanyGATC__sCOMPANY.idcompany
push edx
mov dword [esp + 0x7c], ebp
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x6c
lea eax, [esp + 0x74]
push 1
sub esp, 0x10
mov ecx, esp
mov dword [esp + 0x28], esp
push eax
call fcn.00445210
mov ecx, dword [0x516f90]
mov edx, dword [ecx]
call dword [edx + 0xc]
mov ebx, eax
xor eax, eax
cmp ebx, ebp
sete al
mov dword [0x476ecf4], eax
cmp eax, ebp
jne 0x413b0a
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax + 0x24]
test al, al
jne 0x413b0a
mov al, byte [ebx + 4]
test al, al
jne 0x413abc
mov edx, dword [ebx]
push 2
mov ecx, ebx
call dword [edx + 0x10]
call fcn.0045f9d8
mov esi, eax
mov eax, dword [ebx]
push 1
mov ecx, ebx
call dword [eax + 0x10]
call fcn.0045f9d8
mov edx, dword [ebx]
add esi, eax
xor ecx, ecx
lea eax, [esp + 0x34]
test esi, esi
setg cl
mov dword [esp + 0x10], ecx
push 3
push eax
mov ecx, ebx
call dword [edx + 0x14]
lea ecx, [esp + 0x54]
push 0x20
push ecx
mov ecx, eax
mov dword [esp + 0x884], ebp
call fcn.004453e0
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 + 0x18]
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 + 0x54]
call fcn.00445280
lea ecx, [esp + 0x34]
mov dword [esp + 0x87c], 0xffffffff
call fcn.00445280
mov ebp, dword [sym.imp.SHLWAPI.dll_StrTrimA]
lea ecx, [esp + 0x18]
push 0x46e08c
push ecx
call ebp
mov edx, dword [ebx]
lea eax, [esp + 0x44]
push 4
push eax
mov ecx, ebx
call dword [edx + 0x14]
lea ecx, [esp + 0x64]
push 0x20
push ecx
mov ecx, eax
mov dword [esp + 0x884], 1
call fcn.004453e0
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 + 0x20]
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 + 0x64]
call fcn.00445280
lea ecx, [esp + 0x44]
mov dword [esp + 0x87c], 0xffffffff
call fcn.00445280
lea ecx, [esp + 0x20]
push 0x46e08c
push ecx
call ebp
xor ebp, ebp
mov edx, dword [ebx]
mov ecx, ebx
call dword [edx + 0x1c]
cmp ebx, ebp
je 0x413acf
mov eax, dword [ebx]
push 1
mov ecx, ebx
call dword [eax]
cmp dword [esp + 0x10], ebp
jne 0x413df4
mov esi, 0x514f20
lea eax, [esp + 0x18]
mov dl, byte [eax]
mov bl, byte [esi]
mov cl, dl
cmp dl, bl
jne 0x413b10
test cl, cl
je 0x413b06
mov dl, byte [eax + 1]
mov bl, byte [esi + 1]
mov cl, dl
cmp dl, bl
jne 0x413b10
add eax, 2
add esi, 2
test cl, cl
jne 0x413ae2
xor eax, eax
jmp 0x413b15
mov dword [esp + 0x10], ebp
jmp 0x413ad9
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, ebp
je 0x413df4
mov esi, 0x514f20
lea eax, [esp + 0x20]
mov dl, byte [eax]
mov bl, byte [esi]
mov cl, dl
cmp dl, bl
jne 0x413b4e
test cl, cl
je 0x413b4a
mov dl, byte [eax + 1]
mov bl, byte [esi + 1]
mov cl, dl
cmp dl, bl
jne 0x413b4e
add eax, 2
add esi, 2
test cl, cl
jne 0x413b26
xor eax, eax
jmp 0x413b53
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, ebp
je 0x413df4
lea eax, [esp + 0x20]
lea ecx, [esp + 0x18]
push eax
push ecx
push 0x476ed38
lea edx, [esp + 0x80]
push str.SELECT_iddivisione_idreparti_idqualifica_FROM_GATG__sKINDSUBJECT_WHERE_idcompany_s_AND_idsubject_s
push edx
xor edi, edi
xor ebx, ebx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x14
lea eax, [esp + 0x74]
push 1
sub esp, 0x10
mov ecx, esp
mov dword [esp + 0x28], esp
push eax
call fcn.00445210
mov ecx, dword [0x516f90]
mov edx, dword [ecx]
call dword [edx + 0xc]
mov esi, eax
xor eax, eax
test esi, esi
sete al
test eax, eax
mov dword [0x476ecf4], eax
jne 0x413dec
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0x24]
test al, al
jne 0x413dec
mov al, byte [esi + 4]
test al, al
jne 0x413c00
mov edx, dword [esi]
push 1
mov ecx, esi
call dword [edx + 0x10]
call fcn.0045f9d8
mov edi, eax
mov eax, dword [esi]
push 2
mov ecx, esi
call dword [eax + 0x10]
call fcn.0045f9d8
mov edx, dword [esi]
push 3
mov ecx, esi
mov ebx, eax
call dword [edx + 0x10]
call fcn.0045f9d8
mov ebp, eax
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0x1c]
test esi, esi
je 0x413c13
mov edx, dword [esi]
push 1
mov ecx, esi
call dword [edx]
test edi, edi
jle 0x413cb7
push edi
mov edi, dword [sym.imp.USER32.dll_wsprintfA]
push 0x476ed38
lea eax, [esp + 0x7c]
push str.SELECT_flnotapb_FROM_GATG__sDIVISIONE_WHERE_iddivisione_d
push eax
call edi
add esp, 0x10
lea edx, [esp + 0x74]
push 1
sub esp, 0x10
mov ecx, esp
mov dword [esp + 0x28], esp
push edx
call fcn.00445210
mov ecx, dword [0x516f90]
mov eax, dword [ecx]
call dword [eax + 0xc]
mov esi, eax
xor eax, eax
test esi, esi
sete al
test eax, eax
mov dword [0x476ecf4], eax
jne 0x413cad
mov edx, dword [esi]
mov ecx, esi
call dword [edx + 0x24]
test al, al
jne 0x413cad
mov al, byte [esi + 4]
test al, al
jne 0x413c8c
mov eax, dword [esi]
push 1
mov ecx, esi
call dword [eax + 0x10]
call fcn.0045f9d8
mov dword [esp + 0x10], eax
mov edx, dword [esi]
mov ecx, esi
call dword [edx + 0x1c]
test esi, esi
je 0x413c9f
mov eax, dword [esi]
push 1
mov ecx, esi
call dword [eax]
mov eax, dword [esp + 0x10]
test eax, eax
jne 0x413df4
jmp 0x413cbd
mov dword [esp + 0x10], 0
jmp 0x413cbd
mov edi, dword [sym.imp.USER32.dll_wsprintfA]
test ebx, ebx
jle 0x413d57
push ebx
push 0x476ed38
lea ecx, [esp + 0x7c]
push str.SELECT_flnotapb_FROM_GATG__sREPARTI_WHERE_idreparti_d
push ecx
call edi
add esp, 0x10
lea edx, [esp + 0x74]
push 1
sub esp, 0x10
mov ecx, esp
mov dword [esp + 0x28], esp
push edx
call fcn.00445210
mov ecx, dword [0x516f90]
mov eax, dword [ecx]
call dword [eax + 0xc]
mov esi, eax
xor eax, eax
test esi, esi
sete al
test eax, eax
mov dword [0x476ecf4], eax
jne 0x413ddf
mov edx, dword [esi]
mov ecx, esi
call dword [edx + 0x24]
test al, al
jne 0x413ddf
mov al, byte [esi + 4]
test al, al
jne 0x413d38
mov eax, dword [esi]
push 1
mov ecx, esi
call dword [eax + 0x10]
call fcn.0045f9d8
mov dword [esp + 0x10], eax
mov edx, dword [esi]
mov ecx, esi
call dword [edx + 0x1c]
test esi, esi
je 0x413d4b
mov eax, dword [esi]
push 1
mov ecx, esi
call dword [eax]
mov eax, dword [esp + 0x10]
test eax, eax
jne 0x413df4
test ebp, ebp
jle 0x413df4
push ebp
push 0x476ed38
lea ecx, [esp + 0x7c]
push str.SELECT_flnotapb_FROM_GATG__sQUALIFICA_WHERE_idqualifica_d
push ecx
call edi
add esp, 0x10
lea edx, [esp + 0x74]
push 1
sub esp, 0x10
mov ecx, esp
mov dword [esp + 0x28], esp
push edx
call fcn.00445210
mov ecx, dword [0x516f90]
mov eax, dword [ecx]
call dword [eax + 0xc]
mov esi, eax
xor eax, eax
test esi, esi
sete al
test eax, eax
mov dword [0x476ecf4], eax
jne 0x413dec
mov edx, dword [esi]
mov ecx, esi
call dword [edx + 0x24]
test al, al
jne 0x413dec
mov al, byte [esi + 4]
test al, al
jne 0x413dca
mov eax, dword [esi]
push 1
mov ecx, esi
call dword [eax + 0x10]
call fcn.0045f9d8
mov dword [esp + 0x10], eax
mov edx, dword [esi]
mov ecx, esi
call dword [edx + 0x1c]
test esi, esi
je 0x413df4
mov eax, dword [esi]
push 1
mov ecx, esi
call dword [eax]
jmp 0x413df4
mov dword [esp + 0x10], 0
jmp 0x413d57
mov dword [esp + 0x10], 0
push 0x46054d8
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x874]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
pop ebx
add esp, 0x870
ret