Function at 0x10018320
Capabilities:
Enumerate pe sections

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x20
cmp byte [esi], 0
push ebx
push edi
jne 0x1001863a
mov al, byte [esi + 5]
mov ebx, dword [esi + 0x38]
mov edi, dword [esi + 0x34]
mov byte [esp + 0xb], al
movzx eax, al
movzx ecx, byte [eax + ebx]
add eax, ebx
mov dword [esp + 0x18], eax
mov eax, esi
mov dword [esp + 0x14], edi
call fcn.10018230
test eax, eax
je 0x10018386
push 0x100c0d50
push 0xe0d2
push str.database_corruption
push str._s_at_line__d_of___.10s_
push 0xb
call sym.SQLite3Encrypt.dll_sqlite3_log
add esp, 0x14
mov eax, 0xb
pop edi
pop ebx
mov esp, ebp
pop ebp
ret
movzx ecx, word [edi + 0x24]
mov al, byte [esi + 6]
movzx edx, al
dec cx
mov word [esi + 0x14], cx
movzx ecx, byte [esp + 0xb]
add dx, cx
add dx, 8
movzx ecx, dx
movzx edx, al
mov eax, dword [esp + 0x18]
mov byte [esi + 1], 0
mov edi, dword [edi + 0x28]
add edx, ebx
mov dword [esp + 0x10], edi
mov word [esi + 0xe], cx
add edi, ebx
mov dword [esi + 0x3c], edi
mov dword [esi + 0x44], edx
mov dword [esp + 0x1c], ecx
add ecx, ebx
mov dword [esi + 0x40], ecx
movzx edi, byte [eax + 5]
mov dword [esp + 0x24], ecx
mov ecx, eax
movzx edx, byte [ecx + 6]
movzx eax, byte [ecx + 3]
shl edi, 8
or edi, edx
movzx edx, byte [ecx + 4]
shl ax, 8
or ax, dx
mov edx, dword [esp + 0x14]
mov word [esi + 0x12], ax
mov edx, dword [edx + 0x24]
movzx eax, ax
mov dword [esp + 0x20], eax
sub edx, 8
mov eax, 0xaaaaaaab
mul edx
mov eax, dword [esp + 0x20]
dec edi
and edi, 0xffff
shr edx, 2
inc edi
cmp eax, edx
jbe 0x10018448
push 0x100c0d50
push 0xe0e4
push str.database_corruption
push str._s_at_line__d_of___.10s_
push 0xb
call sym.SQLite3Encrypt.dll_sqlite3_log
add esp, 0x14
mov eax, 0xb
pop edi
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [esp + 0x1c]
lea edx, [edx + eax*2]
mov dword [esp + 0x1c], edx
mov edx, dword [esp + 0x10]
add edx, 0xfffffffc
mov dword [esp + 0xc], edx
mov edx, dword [esp + 0x14]
mov edx, dword [edx + 4]
test dword [edx + 0x18], 0x10000000
je 0x100184f7
cmp byte [esi + 4], 0
jne 0x1001847c
dec dword [esp + 0xc]
mov dword [esp + 0x20], 0
test eax, eax
jle 0x100184ed
mov eax, dword [esp + 0x24]
mov dword [esp + 0x14], eax
mov ecx, dword [esp + 0x14]
mov dx, word [ecx]
mov ah, dl
mov al, dh
movzx eax, ax
mov dword [esp + 0x24], eax
cmp eax, dword [esp + 0x1c]
jl 0x100185b4
cmp eax, dword [esp + 0xc]
jg 0x100185b4
mov ecx, dword [esi + 0x4c]
add eax, ebx
push eax
push esi
call ecx
movzx edx, ax
add edx, dword [esp + 0x2c]
add esp, 8
cmp edx, dword [esp + 0x10]
jg 0x100185a4
mov eax, dword [esp + 0x20]
movzx ecx, word [esi + 0x12]
add dword [esp + 0x14], 2
inc eax
mov dword [esp + 0x20], eax
cmp eax, ecx
jl 0x10018490
mov ecx, dword [esp + 0x18]
cmp byte [esi + 4], 0
jne 0x100184f7
inc dword [esp + 0xc]
movzx edx, byte [ecx + 1]
movzx eax, byte [ecx + 2]
shl dx, 8
or dx, ax
movzx eax, byte [ecx + 7]
movzx edx, dx
add eax, edi
mov dword [esp + 0x20], eax
test dx, dx
je 0x1001858a
movzx eax, dx
cmp eax, dword [esp + 0x1c]
jl 0x10018606
cmp eax, dword [esp + 0xc]
jg 0x10018606
movzx ecx, byte [eax + ebx]
movzx edx, byte [eax + ebx + 1]
movzx edi, byte [eax + ebx + 3]
shl cx, 8
or cx, dx
movzx edx, byte [eax + ebx + 2]
shl dx, 8
or dx, di
movzx ecx, cx
movzx edx, dx
mov dword [esp + 0x24], edx
test cx, cx
je 0x1001856e
movzx edx, dx
lea edx, [edx + eax + 3]
cmp ecx, edx
jle 0x100185dd
mov edx, dword [esp + 0x24]
movzx edx, dx
add eax, edx
cmp eax, dword [esp + 0x10]
jg 0x100185dd
mov eax, dword [esp + 0x20]
add eax, edx
mov dword [esp + 0x20], eax
mov edx, ecx
test cx, cx
jne 0x10018518
cmp eax, dword [esp + 0x10]
jle 0x1001862f
mov eax, 0xe12e
call fcn.1007c2f0
pop edi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, 0xe105
call fcn.1007c2f0
pop edi
pop ebx
mov esp, ebp
pop ebp
ret
push 0x100c0d50
push 0xe100
push str.database_corruption
push str._s_at_line__d_of___.10s_
push 0xb
call sym.SQLite3Encrypt.dll_sqlite3_log
add esp, 0x14
mov eax, 0xb
pop edi
pop ebx
mov esp, ebp
pop ebp
ret
push 0x100c0d50
push 0xe120
push str.database_corruption
push str._s_at_line__d_of___.10s_
push 0xb
call sym.SQLite3Encrypt.dll_sqlite3_log
add esp, 0x14
mov eax, 0xb
pop edi
pop ebx
mov esp, ebp
pop ebp
ret
push 0x100c0d50
push 0xe119
push str.database_corruption
push str._s_at_line__d_of___.10s_
push 0xb
call sym.SQLite3Encrypt.dll_sqlite3_log
add esp, 0x14
mov eax, 0xb
pop edi
pop ebx
mov esp, ebp
pop ebp
ret
sub eax, dword [esp + 0x1c]
mov byte [esi], 1
mov word [esi + 0x10], ax
pop edi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret