Function at 0x485840
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5af9b0
mov eax, dword fs:[0]
push eax
sub esp, 0x4c
mov eax, dword [0x6bd6f8]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov eax, dword [ebp + 0x1c]
mov dword [ebp - 0x4c], eax
mov esi, dword [0x6d6610]
mov dword [ebp - 0x40], esi
mov byte [ebp - 0x31], 0
lea eax, [esi + 0x24]
mov dword [ebp - 0x48], eax
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov dword [ebp - 4], 0
lea edi, [esi + 4]
lea ecx, [ebp + 8]
push ecx
lea edx, [ebp - 0x3c]
push edx
call fcn.00486120
mov ebx, dword [edi + 0x18]
mov eax, dword [edi]
mov ecx, dword [ebp - 0x3c]
test ecx, ecx
je 0x4858b5
cmp ecx, eax
je 0x4858ba
call fcn.005741fa
cmp dword [ebp - 0x38], ebx
jne 0x485a0b
lea eax, [ebp + 8]
push eax
push edi
lea ebx, [ebp - 0x20]
call fcn.00486020
mov ecx, 0x6d50f8
mov edx, dword [0x6d50f8]
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x38], eax
mov byte [ebp - 4], 2
mov ecx, dword [ebp + 8]
push ecx
push str.CREATE_TABLE_scanned__x_file_id_INTEGER__file_time_INTEGER__detection_name_TEXT__
lea eax, [ebp - 0x38]
call fcn.0041759b
add esp, 8
mov byte [ebp - 4], 3
mov edx, dword [ebp - 0x38]
push edx
mov ebx, dword [esi]
call fcn.004844c0
mov dword [ebp - 4], 2
jmp 0x485969
mov edx, dword [ebp + 8]
push edx
push str.CREATE_INDEX_fileIndex_ON_scanned__x_file_id__file_time__
lea eax, [ebp - 0x38]
call fcn.0041759b
add esp, 8
mov byte [ebp - 4], 6
mov eax, dword [ebp - 0x38]
push eax
mov ebx, dword [esi]
call fcn.004844c0
mov dword [ebp - 4], 2
jmp 0x4859e8
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x38]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x485a0b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 0xa
lea ecx, [ebp - 0x38]
push ecx
call fcn.004083c5
mov byte [ebp - 4], 0xb
mov edx, dword [ebp + 8]
push edx
push str.SELECT_detection_name_FROM_scanned__x_WHERE_file_id____AND_file_time____
lea eax, [ebp - 0x38]
call fcn.0041759b
add esp, 8
mov eax, dword [ebp - 0x38]
push eax
lea ecx, [ebp - 0x44]
push ecx
mov ecx, dword [esi]
call fcn.00484440
mov bl, 0xc
mov byte [ebp - 4], bl
mov edx, dword [ebp + 0x10]
push edx
mov eax, dword [ebp + 0xc]
push eax
push 1
lea eax, [ebp - 0x44]
call fcn.00484360
mov ecx, dword [ebp + 0x18]
push ecx
mov edx, dword [ebp + 0x14]
push edx
push 2
lea eax, [ebp - 0x44]
call fcn.00484360
lea eax, [ebp - 0x28]
push eax
lea ecx, [ebp - 0x44]
push ecx
call fcn.004840d0
mov byte [ebp - 4], 0xd
cmp byte [ebp - 0x20], 0
jne 0x485a95
lea esi, [ebp - 0x28]
call fcn.00483c30
push eax
mov edx, dword [ebp - 0x4c]
push edx
call fcn.00408491
mov byte [ebp - 0x31], 1
mov byte [ebp - 4], bl
lea esi, [ebp - 0x28]
call fcn.00483b60
mov byte [ebp - 4], 0xb
lea ecx, [ebp - 0x44]
call fcn.00483ea0
mov byte [ebp - 4], 0xa
lea ecx, [ebp - 0x38]
call fcn.0040842d
mov dword [ebp - 4], 0
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x48]
push edx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov al, byte [ebp - 0x31]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0057340c
mov esp, ebp
pop ebp
ret 0x18