Function at 0x60909ab0
Capabilities:
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3c
push edi
push esi
push ebx
mov ebx, dword [ebp + 8]
mov eax, dword [ebx + 0x18]
mov dword [ebp - 0xc], 0
test eax, eax
jne 0x60909ae4
add esp, 0xfffffff4
push ebx
call sym._winOpenSharedMemory
mov dword [ebp - 0xc], eax
add esp, 0x10
test eax, eax
jne 0x60909c96
mov eax, dword [ebx + 0x18]
mov ebx, dword [eax]
add esp, 0xfffffff4
push dword [ebx]
call sym.sqlite3.dll_sqlite3_mutex_enter
add esp, 0x10
mov eax, dword [ebp + 0xc]
cmp dword [ebx + 0x30], eax
jg 0x60909c53
mov esi, eax
inc esi
mov edx, esi
imul edx, dword [ebp + 0x10]
mov dword [ebp - 0x10], edx
mov ecx, dword [ebp + 0x10]
mov dword [ebx + 0x2c], ecx
add esp, 0xfffffff8
lea edi, [ebp - 8]
push edi
lea eax, [ebx + 8]
mov dword [ebp - 0x14], eax
push eax
call sym._winFileSize
mov dword [ebp - 0xc], eax
add esp, 0x10
test eax, eax
jne 0x60909b74
mov edx, dword [ebp - 0x10]
mov dword [ebp - 0x28], edx
sar edx, 0x1f
mov dword [ebp - 0x24], edx
mov ecx, dword [edi + 4]
cmp dword [ebp - 0x24], ecx
jg 0x60909b4c
jne 0x60909b80
mov eax, dword [ebp - 0x28]
cmp eax, dword [ebp - 8]
jbe 0x60909b80
cmp dword [ebp + 0x14], 0
je 0x60909c53
add esp, 0xfffffffc
mov edx, dword [ebp - 0x28]
mov ecx, dword [ebp - 0x24]
push ecx
push edx
mov ecx, dword [ebp - 0x14]
push ecx
call sym._winTruncate
mov dword [ebp - 0xc], eax
add esp, 0x10
test eax, eax
je 0x60909b80
mov dword [ebp - 0xc], 0x130a
jmp 0x60909c53
add esp, 0xfffffff8
shl esi, 3
push esi
push dword [ebx + 0x34]
call sym.sqlite3.dll_sqlite3_realloc
add esp, 0x10
test eax, eax
jne 0x60909ba4
mov dword [ebp - 0xc], 0xc0a
jmp 0x60909c53
mov dword [ebx + 0x34], eax
mov eax, dword [ebp + 0xc]
cmp dword [ebx + 0x30], eax
jg 0x60909c5b
nop
xor edi, edi
add esp, 0xfffffff8
push 0
mov edx, dword [ebp - 0x10]
push edx
push 0
push 4
push 0
push dword [ebx + 0x10]
call sub.KERNEL32.dll_CreateFileMappingA
mov esi, eax
add esp, 8
test esi, esi
je 0x60909c04
mov edi, dword [ebp + 0x10]
imul edi, dword [ebx + 0x30]
mov eax, edi
xor edx, edx
div dword [0x6096e30c]
mov ecx, edx
add esp, 0xfffffff4
mov eax, dword [ebp + 0x10]
add eax, ecx
push eax
sub edi, ecx
push edi
push 0
push 6
push esi
call sub.KERNEL32.dll_MapViewOfFile
mov edi, eax
add esp, 0xc
test edi, edi
jne 0x60909c2c
call sub.KERNEL32.dll_GetLastError
mov dword [ebx + 0x38], eax
mov dword [ebp - 0xc], 0xa
test esi, esi
je 0x60909c53
add esp, 0xfffffff4
push esi
call sub.KERNEL32.dll_CloseHandle
add esp, 0xc
jmp 0x60909c53
mov edx, dword [ebx + 0x30]
mov eax, dword [ebx + 0x34]
mov dword [eax + edx*8 + 4], edi
mov edx, dword [ebx + 0x30]
mov eax, dword [ebx + 0x34]
mov dword [eax + edx*8], esi
mov eax, dword [ebx + 0x30]
lea ecx, [eax + 1]
mov dword [ebx + 0x30], ecx
mov eax, ecx
cmp eax, dword [ebp + 0xc]
jle 0x60909bb4
mov eax, dword [ebp + 0xc]
cmp dword [ebx + 0x30], eax
jle 0x60909c80
mov edx, dword [ebp + 0xc]
imul edx, dword [ebp + 0x10]
mov dword [ebp + 0x10], edx
mov eax, edx
xor edx, edx
div dword [0x6096e30c]
mov eax, dword [ebx + 0x34]
mov ecx, dword [ebp + 0xc]
add edx, dword [eax + ecx*8 + 4]
mov ecx, dword [ebp + 0x18]
mov dword [ecx], edx
jmp 0x60909c89
mov eax, dword [ebp + 0x18]
mov dword [eax], 0
add esp, 0xfffffff4
push dword [ebx]
call sym.sqlite3.dll_sqlite3_mutex_leave
mov eax, dword [ebp - 0xc]
lea esp, [ebp - 0x48]
pop ebx
pop esi
pop edi
leave
ret