Function at 0x10018c50
Capabilities:
Reference sql statements

Disassembly:
push ebp
lea ebp, [esp - 0x20c]
sub esp, 0x20c
push 0xffffffffffffffff
push 0x10136a40
mov eax, dword fs:[0]
push eax
sub esp, 0x10
mov eax, dword [0x1017455c]
xor eax, ebp
mov dword [ebp + 0x208], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
xor esi, esi
push 0x103
lea eax, [ebp + 1]
mov ebx, ecx
push esi
push eax
mov dword [ebp - 0x1c], ebx
mov byte [ebp - 0x11], 0
mov dword [ebp - 0x18], esi
mov byte [ebp], 0
call fcn.10116880
push 0x103
lea ecx, [ebp + 0x105]
push esi
push ecx
mov byte [ebp + 0x104], 0
call fcn.10116880
add esp, 0x18
lea ecx, [ebp]
mov dword [ebp - 4], esi
call fcn.1004c9c0
cmp byte [ebp], 0
je 0x10018cfc
lea edi, [ebp]
call fcn.10044b00
cmp eax, esi
je 0x10018cfc
mov ecx, edi
lea edx, [ebp + 0x104]
mov edi, edi
mov al, byte [ecx]
mov byte [edx], al
inc ecx
inc edx
test al, al
jne 0x10018cf0
jmp 0x10018d10
lea edx, [ebp + 0x104]
push 0x104
push edx
call fcn.10042f40
add esp, 8
cmp byte [ebp + 0x104], 0
je 0x10018d4a
lea eax, [ebp + 0x104]
nop
cmp byte [eax], 0
je 0x10018d28
inc eax
jmp 0x10018d20
lea ecx, [ebp + 0x104]
sub eax, ecx
je 0x10018d4a
cmp byte [ebp + eax + 0x103], 0x5c
je 0x10018d4a
push 0x10149ea8
mov edx, ecx
push edx
call dword [sym.imp.KERNEL32.dll_lstrcatA]
lea eax, [ebp + 0x104]
or edi, 0xffffffff
add eax, edi
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x10018d55
mov ecx, dword [str.iplocdb.db]
mov edx, dword [0x1014b058]
mov dword [eax], ecx
mov cx, word [0x1014b05c]
mov dword [eax + 4], edx
mov dl, byte [0x1014b05e]
mov word [eax + 8], cx
mov byte [eax + 0xa], dl
push esi
push esi
xor edx, edx
lea ecx, [ebp + 0x104]
call fcn.10044660
add esp, 8
push esi
push 6
lea eax, [ebp + 0x104]
push 0x1019142c
push eax
call fcn.10108550
add esp, 0x10
cmp eax, esi
je 0x10018df9
mov ecx, dword [0x1019142c]
push ecx
call fcn.101079c0
add esp, 4
cmp ebx, esi
je 0x10018df5
cmp eax, esi
je 0x10018de0
push eax
lea edx, [ebp + 0x104]
push edx
push str.Failed_to_Open___s_.__s
push ebx
call fcn.1010d6a8
add esp, 0x10
xor al, al
jmp 0x10018e43
lea eax, [ebp + 0x104]
push eax
push str.Failed_to_Open___s_.
push ebx
call fcn.1010d6a8
add esp, 0xc
xor al, al
jmp 0x10018e43
mov edx, dword [0x1019142c]
lea ecx, [ebp - 0x18]
push ecx
push esi
push esi
push str.PRAGMA_page_size__4096_
push edx
call fcn.100e5890
add esp, 0x14
cmp eax, esi
je 0x10018e68
cmp ebx, esi
je 0x10018e2d
mov eax, dword [ebp - 0x18]
push eax
push str.Failed_to_set_page_size__sqliteErrMsg_:__s_
push ebx
call fcn.1010d6a8
add esp, 0xc
mov dword [ebp - 4], edi
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x10018e40
push eax
call fcn.100a0aa0
add esp, 4
mov al, byte [ebp - 0x11]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x208]
xor ecx, ebp
call fcn.1010d699
add ebp, 0x20c
mov esp, ebp
pop ebp
ret
mov edx, dword [0x1019142c]
lea ecx, [ebp - 0x18]
push ecx
push esi
push esi
push str.PRAGMA_journal_mode__WAL_
push edx
call fcn.100e5890
add esp, 0x14
cmp eax, esi
je 0x10018e95
cmp ebx, esi
je 0x10018e2d
mov eax, dword [ebp - 0x18]
push eax
push str.Failed_to_set_journal_mode_to_WAL__sqliteErrMsg_:__s_
jmp 0x10018e24
mov edx, dword [0x1019142c]
lea ecx, [ebp - 0x18]
push ecx
push esi
push esi
push str.CREATE_TABLE_IF_NOT_EXISTS_IPLocData_IdNo_INTEGER_PRIMARY_KEY_AUTOINCREMENT__IP_TEXT_UNIQUE__Output_TEXT__InsertTime_INTEGER_4___
push edx
call fcn.100e5890
add esp, 0x14
cmp eax, esi
je 0x10018ec9
cmp ebx, esi
je 0x10018e2d
mov eax, dword [ebp - 0x18]
push eax
push str.Failed_to_create_Table_RAUserData__sqliteErrMsg_:__s_
jmp 0x10018e24
mov eax, dword [ebp - 0x18]
cmp eax, esi
je 0x10018edc
push eax
call fcn.100a0aa0
add esp, 4
mov dword [ebp - 0x18], esi
mov eax, dword [0x1019142c]
push esi
push esi
push 1
push edi
push str.SELECT_1_FROM_IPLocData_where_IP____
mov esi, 0x10191658
call fcn.100eaec0
add esp, 0x14
test eax, eax
je 0x10018f1e
test ebx, ebx
je 0x10018e2d
mov ecx, dword [0x1019142c]
push ecx
call fcn.101079c0
add esp, 4
push eax
push str.Failed_to_create_doesIPExistStmt_prepared_stmt__sqlite3_errmsg_:__s_
jmp 0x10018e24
mov eax, dword [0x1019142c]
push 0
push 0
push 1
push edi
push str.SELECT_Output_FROM_IPLocData_WHERE_IP____COLLATE_NOCASE_Limit_1_
mov esi, 0x10191660
call fcn.100eaec0
add esp, 0x14
test eax, eax
je 0x10018f62
test ebx, ebx
je 0x10018e2d
mov edx, dword [0x1019142c]
push edx
call fcn.101079c0
add esp, 4
push eax
push str.Failed_to_create_GetLocStringStmt_prepared_stmt__sqlite3_errmsg_:__s_
jmp 0x10018e24
mov eax, dword [0x1019142c]
push 0
push 0x1019165c
push edi
push str.UPDATE_IPLocData_SET_Output_____InsertTime__strftime__s_now__WHERE_IP____
push eax
call fcn.100eb050
add esp, 0x14
test eax, eax
je 0x10018fa3
test ebx, ebx
je 0x10018e2d
mov ecx, dword [0x1019142c]
push ecx
call fcn.101079c0
add esp, 4
push eax
push str.Failed_to_create_prepared_statement_updateIPLocData__sqlite3_errmsg_:__s_
jmp 0x10018e24
mov edx, dword [0x1019142c]
push 0
push 0x10191654
push edi
push str.INSERT_INTO_IPLocData_IP__Output__InsertTime__VALUES_______strftime__s_now___
push edx
call fcn.100eb050
add esp, 0x14
test eax, eax
je 0x10018fe4
test ebx, ebx
je 0x10018e2d
mov eax, dword [0x1019142c]
push eax
call fcn.101079c0
add esp, 4
push eax
push str.Failed_to_create_prepared_statement_insertIPLocDataStmt__sqlite3_errmsg_:__s_
jmp 0x10018e24
mov byte [ebp - 0x11], 1
jmp 0x10018e2d