Function at 0x10005c80
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x1002da59
mov eax, dword fs:[0]
push eax
sub esp, 0x450
mov eax, dword [0x100ff120]
xor eax, esp
mov dword [esp + 0x448], eax
push ebx
push esi
push edi
mov eax, dword [0x100ff120]
xor eax, esp
push eax
lea eax, [esp + 0x460]
mov dword fs:[0], eax
mov ebx, dword [0x10102410]
mov esi, ecx
mov dword [esp + 0x18], esi
test ebx, ebx
jne 0x10005d13
push 0x10001f60
call fcn.100157da
add esp, 4
push 0x40
call fcn.1001584d
add esp, 4
mov dword [esp + 0x2c], eax
mov dword [esp + 0x468], ebx
test eax, eax
je 0x10005cfe
push eax
call fcn.10001f90
jmp 0x10005d00
xor eax, eax
mov ebx, eax
mov dword [esp + 0x468], 0xffffffff
mov dword [0x10102410], ebx
cmp dword [ebx + 0x34], 8
lea edi, [ebx + 0x20]
mov dword [esp + 0x24], ebx
jb 0x10005d24
mov eax, dword [edi]
jmp 0x10005d26
mov eax, edi
push eax
call fcn.100084c8
add esp, 4
test eax, eax
je 0x10005d5f
cmp dword [edi + 0x14], 8
jb 0x10005d3b
mov edi, dword [edi]
push edi
call fcn.100084e6
add esp, 4
mov dword [esp + 0x14], eax
cmp eax, dword [ebx + 0x3c]
je 0x10005d5f
mov edi, ebx
call fcn.10002110
test eax, eax
jne 0x10005d5f
mov eax, dword [esp + 0x14]
mov dword [ebx + 0x3c], eax
mov ecx, dword [ebx + 4]
sub ecx, dword [ebx]
mov dword [esp + 0x14], 0
sar ecx, 7
test ecx, ecx
je 0x10005f7a
lea edx, [esi + 0x40]
lea edi, [esi + 0x44]
mov dword [esp + 0x28], edx
mov dword [esp + 0x20], edi
mov dword [esp + 0x1c], 0
jmp 0x10005d94
mov ebx, dword [esp + 0x24]
mov ebx, dword [ebx]
add ebx, dword [esp + 0x1c]
push 0x3ff
lea eax, [esp + 0x59]
push 0
push eax
mov byte [esp + 0x60], 0
call fcn.100174f0
mov ecx, dword [ebx]
add esp, 0xc
push ecx
lea edx, [esp + 0x58]
push str.SELECT_name_FROM_sqlite_master_WHERE_name_LIKE_u__u__U_____ORDER_BY_name_DESC_LIMIT_1
push edx
call fcn.10015d26
mov eax, dword [edi]
mov edx, dword [eax + 0x14]
add esp, 0xc
mov ecx, edi
call edx
mov eax, dword [esp + 0x28]
mov edx, dword [esi + 0x3c]
push eax
mov eax, dword [esi + 0x14]
push edi
push 0x10007620
lea ecx, [esp + 0x60]
push ecx
push edx
call eax
xor ecx, ecx
add esp, 0x14
cmp eax, ecx
jne 0x10005f58
mov edx, dword [ebx]
mov dword [esp + 0x34], ecx
mov dword [esp + 0x30], edx
mov dword [esp + 0x4c], 0xf
mov dword [esp + 0x48], ecx
mov byte [esp + 0x38], cl
mov dword [esp + 0x468], 1
mov eax, dword [esi + 0x44]
mov edx, dword [eax]
lea ecx, [esi + 0x44]
call edx
test eax, eax
je 0x10005e4d
mov eax, dword [eax]
mov ecx, eax
lea esi, [ecx + 1]
mov dl, byte [ecx]
inc ecx
test dl, dl
jne 0x10005e31
sub ecx, esi
mov edi, ecx
lea esi, [esp + 0x38]
call fcn.100062c0
mov esi, dword [esp + 0x18]
mov edi, dword [esp + 0x20]
mov eax, dword [esi + 0x44]
mov edx, dword [eax + 0x14]
lea ecx, [esi + 0x44]
mov dword [esp + 0x2c], ecx
call edx
cmp dword [esp + 0x48], 0
jne 0x10005e8b
mov dword [esp + 0x468], 0xffffffff
cmp dword [esp + 0x4c], 0x10
jb 0x10005f58
mov eax, dword [esp + 0x38]
push eax
call fcn.100157f1
add esp, 4
jmp 0x10005f58
cmp dword [esp + 0x4c], 0x10
mov eax, dword [esp + 0x38]
jae 0x10005e9a
lea eax, [esp + 0x38]
push eax
lea ecx, [esp + 0x58]
push str.SELECT_dt_FROM__s_ORDER_BY_dt_DESC_LIMIT_1
push ecx
call fcn.10015d26
mov edx, dword [edi]
mov eax, dword [edx + 0x14]
add esp, 0xc
mov ecx, edi
call eax
mov ecx, dword [esp + 0x28]
mov eax, dword [esi + 0x3c]
push ecx
mov ecx, dword [esi + 0x14]
push edi
push 0x10007620
lea edx, [esp + 0x60]
push edx
push eax
call ecx
add esp, 0x14
test eax, eax
je 0x10005ef7
mov dword [esp + 0x468], 0xffffffff
cmp dword [esp + 0x4c], 0x10
jb 0x10005f58
mov edx, dword [esp + 0x38]
push edx
call fcn.100157f1
add esp, 4
jmp 0x10005f58
mov esi, dword [esp + 0x2c]
mov eax, dword [esi]
mov edx, dword [eax]
mov ecx, esi
call edx
test eax, eax
je 0x10005f1a
mov eax, dword [eax]
push 0xa
push 0
push eax
call fcn.10016d91
add esp, 0xc
mov dword [esp + 0x34], eax
mov edx, dword [esi]
mov eax, dword [edx + 0x14]
mov ecx, esi
call eax
mov eax, dword [esp + 0x18]
push ebx
lea ebx, [esp + 0x34]
call fcn.10005930
mov dword [esp + 0x468], 0xffffffff
cmp dword [esp + 0x4c], 0x10
jb 0x10005f50
mov ecx, dword [esp + 0x38]
push ecx
call fcn.100157f1
add esp, 4
mov edi, dword [esp + 0x20]
mov esi, dword [esp + 0x18]
mov ecx, dword [esp + 0x24]
mov edx, dword [ecx + 4]
sub edx, dword [ecx]
mov eax, dword [esp + 0x14]
sub dword [esp + 0x1c], 0xffffff80
inc eax
sar edx, 7
mov dword [esp + 0x14], eax
cmp eax, edx
jb 0x10005d90
xor eax, eax
mov ecx, dword [esp + 0x460]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x448]
xor ecx, esp
call fcn.10015100
mov esp, ebp
pop ebp
ret