Function at 0x1004ed40
Capabilities:
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x14
push ebx
push ebp
mov ebp, dword [esp + 0x20]
push esi
cmp byte [ebp], 0
jne 0x1004ede4
mov dl, byte [ebp + 1]
test dl, 2
je 0x1004ede4
mov ecx, dword [ebp + 0x20]
mov esi, dword [esp + 0x28]
mov eax, dword [ebp + 0x24]
mov ebx, dword [esp + 0x2c]
cmp ecx, esi
jne 0x1004ed89
cmp eax, ebx
jne 0x1004ed8b
mov eax, dword [esp + 0x34]
pop esi
pop ebp
pop ebx
mov dword [eax], 0
xor eax, eax
add esp, 0x14
ret
cmp eax, ebx
jg 0x1004ede4
jl 0x1004ed93
cmp ecx, esi
jae 0x1004ede4
test dl, 8
jne 0x1004edfa
add ecx, 1
adc eax, 0
cmp ecx, esi
jne 0x1004ede4
cmp eax, ebx
jne 0x1004ede4
mov eax, dword [esp + 0x34]
push 0
push ebp
mov dword [eax], 0
call fcn.1004dbe0
add esp, 8
test eax, eax
jne 0x1004eddb
push ebp
call fcn.10031000
add esp, 4
cmp dword [ebp + 0x20], esi
jne 0x1004ede4
cmp dword [ebp + 0x24], ebx
jne 0x1004ede4
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x14
ret
cmp eax, 0x65
jne 0x1004f00b
push ebp
call fcn.10038010
add esp, 4
test eax, eax
je 0x1004ee0d
cmp eax, 0x10
jne 0x1004f00b
mov eax, dword [esp + 0x34]
pop esi
pop ebp
pop ebx
mov dword [eax], 0xffffffff
xor eax, eax
add esp, 0x14
ret
mov eax, 1
lea ebx, [ebp + 0x74]
sub eax, dword [esp + 0x30]
mov dword [esp + 0x14], eax
push edi
nop
mov edx, dword [ebx]
mov ecx, eax
xor ebx, ebx
mov dword [esp + 0x10], edx
movzx edi, word [edx + 0x18]
mov eax, dword [edx + 0x40]
dec edi
mov esi, edi
mov dword [esp + 0x14], eax
sar esi, cl
mov cl, byte [edx + 2]
mov byte [esp + 0x28], cl
mov ax, word [eax + esi*2]
mov ch, al
mov cl, ah
movzx eax, cx
movzx ecx, word [edx + 0x1a]
and eax, ecx
add eax, dword [edx + 0x44]
cmp byte [esp + 0x28], 0
je 0x1004ee73
cmp byte [eax], 0x80
jb 0x1004ee72
mov ecx, dword [edx + 0x3c]
inc eax
cmp eax, ecx
jae 0x1004ef92
cmp byte [eax], 0x80
jae 0x1004ee64
inc eax
lea ecx, [esp + 0x1c]
push ecx
push eax
call fcn.10061920
mov ecx, dword [esp + 0x28]
add esp, 8
mov eax, dword [esp + 0x1c]
cmp ecx, dword [esp + 0x30]
jg 0x1004eea5
jl 0x1004ee99
mov edx, dword [esp + 0x2c]
cmp eax, edx
jae 0x1004eea9
lea ebx, [esi + 1]
cmp ebx, edi
jle 0x1004eebc
or eax, 0xffffffff
jmp 0x1004eed3
mov edx, dword [esp + 0x2c]
cmp ecx, dword [esp + 0x30]
jl 0x1004eef7
jg 0x1004eeb5
cmp eax, edx
jbe 0x1004eef7
lea edi, [esi - 1]
cmp ebx, edi
jg 0x1004eece
mov edx, dword [esp + 0x10]
lea esi, [edi + ebx]
mov eax, dword [esp + 0x14]
sar esi, 1
jmp 0x1004ee41
mov eax, 1
mov edx, dword [esp + 0x10]
cmp byte [edx + 8], 0
je 0x1004ef0b
mov ecx, dword [esp + 0x38]
mov word [ebp + 0x46], si
pop edi
pop esi
mov dword [ecx], eax
xor eax, eax
xor ecx, ecx
mov word [ebp + 0x32], cx
pop ebp
pop ebx
add esp, 0x14
ret
mov edx, dword [esp + 0x10]
mov word [ebp + 0x46], si
cmp byte [edx + 8], 0
jne 0x1004efee
mov ebx, esi
movzx eax, word [edx + 0x18]
cmp ebx, eax
jl 0x1004ef20
movzx ecx, byte [edx + 9]
mov eax, dword [edx + 0x38]
mov edx, dword [ecx + eax + 8]
jmp 0x1004ef3a
mov eax, dword [edx + 0x40]
mov ax, word [eax + ebx*2]
mov ch, al
mov cl, ah
movzx eax, word [edx + 0x1a]
movzx ecx, cx
and ecx, eax
mov eax, dword [edx + 0x38]
mov edx, dword [ecx + eax]
mov al, byte [ebp + 0x44]
movzx ecx, bx
mov word [ebp + 0x46], cx
cmp al, 0x13
jge 0x1004efbd
and byte [ebp + 1], 0xf9
lea ebx, [ebp + 0x74]
movsx eax, al
xor esi, esi
mov word [ebp + 0x32], si
bswap edx
mov word [ebp + eax*2 + 0x48], cx
movsx ecx, byte [ebp + 0x44]
mov eax, dword [ebx]
mov dword [ebp + ecx*4 + 0x78], eax
xor eax, eax
inc byte [ebp + 0x44]
mov word [ebp + 0x46], ax
movzx eax, byte [ebp + 2]
push eax
push ebp
push ebx
push edx
push dword [ebp + 0x14]
call fcn.10030f10
add esp, 0x14
test eax, eax
jne 0x1004efe0
mov eax, dword [esp + 0x18]
jmp 0x1004ee20
push 0x100b85cc
push 0x12042
push str.database_corruption
push str._s_at_line__d_of___.10s_
push 0xb
call sym.sqlite3.dll_sqlite3_log
add esp, 0x14
mov eax, 0xb
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret
push 0x100b85cc
push 0x11eb9
push str.database_corruption
push str._s_at_line__d_of___.10s_
push 0xb
call sym.sqlite3.dll_sqlite3_log
add esp, 0x14
mov eax, 0xb
pop edi
xor ecx, ecx
pop esi
mov word [ebp + 0x32], cx
pop ebp
pop ebx
add esp, 0x14
ret
or byte [ebp + 1], 2
mov dword [ebp + 0x20], eax
xor eax, eax
mov word [ebp + 0x32], ax
mov eax, dword [esp + 0x38]
mov dword [ebp + 0x24], ecx
pop edi
mov dword [eax], 0
xor eax, eax
pop esi
pop ebp
pop ebx
add esp, 0x14
ret