Function at 0x42d120
Capabilities:
Reference sql statements

Disassembly:
mov eax, dword [0x476ecf4]
sub esp, 0x808
test eax, eax
push ebp
push esi
push edi
je 0x42d13e
xor eax, eax
pop edi
pop esi
pop ebp
add esp, 0x808
ret
push 0x46054d8
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ebp, dword [esp + 0x824]
mov eax, dword [esp + 0x818]
test ebp, ebp
mov dword [esp + 0xc], 0
lea ecx, [eax + eax*2]
je 0x42d18e
lea ecx, [ecx + ecx*8]
lea ecx, [eax + ecx*8]
lea edx, [ecx + ecx*2]
mov ecx, dword [esp + 0x81c]
lea eax, [eax + edx*2]
lea eax, [eax + eax*4]
lea esi, [ecx + eax*8]
shl esi, 2
mov dword [esi + 0x6587fc], 0
jmp 0x42d1b4
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 [esp + 0x81c]
lea esi, [eax + edx*8]
shl esi, 2
mov dword [esi + 0x65887c], 0
mov eax, dword [esi + 0x65877c]
test eax, eax
je 0x42d2de
push 0x476ed38
push 0x476ed38
push 0x476ed38
mov eax, dword [esp + 0x834]
push 0x476ed38
push 0x476ed38
push 0x476ed38
push 0x476ed38
mov ecx, dword [esp + 0x83c]
push 0x476ed38
push 0x476ed38
push 0x476ed38
push 0x476ed38
push 0x476ed38
push eax
push 0x476ed38
push eax
push 0x476ed38
push ecx
push 0x476ed38
push 0x476ed38
push 0x476ed38
push 0x476ed38
lea edx, [esp + 0x68]
push str.SELECT_GATC__sBADGE.idcompany_FROM_GATC__sBADGE_codd__ssubject15_WHERE_GATC__sBADGE.area_d_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.lgokticket1_AND_codd__ssubject15.lgokaccess1
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x5c
lea eax, [esp + 0x14]
push 1
sub esp, 0x10
mov ecx, esp
mov dword [esp + 0x24], esp
push eax
call fcn.00445210
mov ecx, dword [0x516f90]
mov edx, dword [ecx]
call dword [edx + 0xc]
mov edi, eax
xor eax, eax
test edi, edi
sete al
test eax, eax
mov dword [0x476ecf4], eax
jne 0x42d38b
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 0x24]
test al, al
jne 0x42d38b
mov al, byte [edi + 4]
test al, al
jne 0x42d2b7
mov edx, dword [edi]
mov ecx, edi
call dword [edx + 0x24]
test al, al
jne 0x42d2b7
test ebp, ebp
je 0x42d2a3
inc dword [esi + 0x6587fc]
jmp 0x42d2a9
inc dword [esi + 0x65887c]
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 0x20]
mov al, byte [edi + 4]
test al, al
je 0x42d28c
mov edx, dword [edi]
mov ecx, edi
call dword [edx + 0x24]
test al, al
jne 0x42d2ca
mov dword [esp + 0xc], 1
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 0x1c]
test edi, edi
je 0x42d38b
jmp 0x42d383
mov eax, dword [esp + 0x820]
lea ecx, [esp + 0x14]
push eax
push 0x476ed38
push str.SELECT_count___FROM_GATC__sBADGE_WHERE_area_d
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
lea edx, [esp + 0x14]
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]
mov edi, eax
xor eax, eax
test edi, edi
sete al
test eax, eax
mov dword [0x476ecf4], eax
jne 0x42d38b
mov edx, dword [edi]
mov ecx, edi
call dword [edx + 0x24]
test al, al
jne 0x42d38b
mov al, byte [edi + 4]
test al, al
jne 0x42d378
test ebp, ebp
je 0x42d35c
mov eax, dword [edi]
push 1
mov ecx, edi
call dword [eax + 0x10]
call fcn.0045f9d8
mov dword [esi + 0x6587fc], eax
jmp 0x42d370
mov edx, dword [edi]
push 1
mov ecx, edi
call dword [edx + 0x10]
call fcn.0045f9d8
mov dword [esi + 0x65887c], eax
mov dword [esp + 0xc], 1
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 0x1c]
test edi, edi
je 0x42d38b
mov edx, dword [edi]
push 1
mov ecx, edi
call dword [edx]
push 0x46054d8
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [esp + 0xc]
pop edi
pop esi
pop ebp
add esp, 0x808
ret