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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x1c
push ebx
push esi
mov esi, ecx
mov dword [esp + 0x10], 0
mov ebx, edx
mov dword [esp + 0xc], esi
push edi
dec dword [esi + 0x38]
mov eax, dword [ebx + 0x1c]
mov edi, dword [esi + 8]
and eax, 0x80
cmp byte [ebp + 0x24], 0
mov ecx, dword [esi + 0x38]
mov dword [esp + 0x24], edi
mov dword [esp + 0x18], ecx
mov dword [esp + 0x20], eax
jne 0x1005ce98
mov ax, word [ebp + 0x18]
mov edx, 0x1e
cmp dword [esp + 0x20], 0
cwde
push eax
push dword [ebp + 0x14]
mov eax, 0x21
push ecx
push dword [ebp + 0xc]
cmove edx, eax
mov ecx, edi
call fcn.10029b70
add esp, 0x10
push 0
push 0
mov edx, ebx
mov ecx, esi
call fcn.10064270
add esp, 8
test eax, eax
mov eax, dword [ebp + 8]
jne 0x1005cebb
test eax, eax
jne 0x1005cebb
mov esi, dword [ebp + 0x28]
jmp 0x1005d05f
mov dword [esp + 0x14], 0
mov esi, eax
test eax, eax
je 0x1005cf1a
mov edi, dword [esp + 0x10]
nop dword [eax]
cmp byte [esi + 8], 0x7f
jne 0x1005cf0f
test byte [esi + 9], 3
je 0x1005cf0f
cmp byte [esi + 0xa], 0
je 0x1005ceec
mov dword [esp + 0x14], 0xffffffff
jmp 0x1005cf0f
movzx eax, byte [ebp + 0x20]
mov edx, esi
push eax
push ebx
mov ecx, edi
call fcn.10082270
mov ecx, eax
add esp, 8
test ecx, ecx
je 0x1005cf0f
mov eax, dword [esp + 0x14]
or eax, dword [ecx + 0x10]
mov dword [esp + 0x14], eax
mov esi, dword [esi + 0x20]
test esi, esi
jne 0x1005ced0
mov edi, dword [esp + 0x24]
mov esi, dword [esp + 0x10]
mov edx, ebx
mov ecx, esi
call fcn.10064180
movsx ecx, word [ebx + 0x22]
mov edx, dword [esi + 0x2c]
inc ecx
or eax, dword [esp + 0x14]
add ecx, edx
mov dword [esi + 0x2c], ecx
mov ecx, dword [edi + 0x74]
mov dword [esp + 0x1c], eax
lea eax, [edx + 1]
mov dword [esp + 0x14], eax
cmp dword [edi + 0x78], ecx
jg 0x1005cf62
push 0
push eax
push dword [ebp + 0x14]
mov edx, 0x4e
mov ecx, edi
call fcn.10029250
add esp, 0xc
jmp 0x1005cf94
mov edx, dword [ebp + 0x14]
lea eax, [ecx + 1]
mov dword [edi + 0x74], eax
lea ecx, [ecx + ecx*4]
mov eax, dword [edi + 0x70]
mov dword [eax + ecx*4 + 4], edx
mov edx, dword [esp + 0x14]
mov dword [eax + ecx*4], 0x4e
mov dword [eax + ecx*4 + 8], edx
mov dword [eax + ecx*4 + 0xc], 0
mov dword [eax + ecx*4 + 0x10], 0
xor eax, eax
xor esi, esi
cmp ax, word [ebx + 0x22]
jge 0x1005cfe8
mov edx, dword [esp + 0x1c]
cmp edx, 0xffffffff
je 0x1005cfb9
cmp esi, 0x1f
jg 0x1005cfdf
mov eax, 1
mov ecx, esi
shl eax, cl
test edx, eax
je 0x1005cfdf
mov edx, esi
mov ecx, ebx
call fcn.10053d40
mov ecx, dword [esp + 0x14]
mov edx, ebx
inc ecx
cwde
add eax, ecx
mov ecx, edi
push eax
push esi
push dword [ebp + 0xc]
call fcn.10046c60
mov edx, dword [esp + 0x28]
add esp, 0xc
movsx eax, word [ebx + 0x22]
inc esi
cmp esi, eax
jl 0x1005cfa2
push dword [esp + 0x18]
movzx eax, byte [ebp + 0x20]
mov edx, dword [ebp + 8]
mov ecx, dword [esp + 0x14]
mov esi, dword [edi + 0x74]
push eax
push dword [esp + 0x1c]
push ebx
push 1
push 0
push 0x7f
call fcn.10082750
add esp, 0x1c
cmp esi, dword [edi + 0x74]
jge 0x1005d044
mov ax, word [ebp + 0x18]
mov ecx, 0x21
cmp dword [esp + 0x20], 0
mov edx, 0x1e
cwde
push eax
push dword [ebp + 0x14]
cmove edx, ecx
mov ecx, edi
push dword [esp + 0x20]
push dword [ebp + 0xc]
call fcn.10029b70
add esp, 0x10
or esi, 0xffffffff
jmp 0x1005d047
mov esi, dword [ebp + 0x28]
mov ecx, dword [esp + 0x10]
mov edx, ebx
push 0
push 0
push 0
push dword [esp + 0x20]
call fcn.10063990
add esp, 0x10
cmp byte [ebx + 0x2b], 2
je 0x1005d1a3
mov ecx, dword [esp + 0x10]
mov edx, ebx
push esi
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
call fcn.1005d210
mov ecx, dword [edi + 0x74]
xor edx, edx
add esp, 0x10
cmp byte [ebp + 0x1c], dl
setne dl
cmp dword [edi + 0x78], ecx
jg 0x1005d0a7
push 0
push edx
push dword [ebp + 0xc]
mov edx, 0x80
mov ecx, edi
call fcn.10029250
add esp, 0xc
jmp 0x1005d0d9
lea eax, [ecx + 1]
mov dword [edi + 0x74], eax
lea ecx, [ecx + ecx*4]
mov eax, dword [edi + 0x70]
mov edi, dword [ebp + 0xc]
mov dword [eax + ecx*4 + 4], edi
mov edi, dword [esp + 0x24]
mov dword [eax + ecx*4], 0x80
mov dword [eax + ecx*4 + 8], edx
mov dword [eax + ecx*4 + 0xc], 0
mov dword [eax + ecx*4 + 0x10], 0
mov eax, dword [esp + 0x10]
cmp byte [eax + 0x12], 0
je 0x1005d0f7
mov ecx, dword [ebx]
test ecx, ecx
je 0x1005d111
mov edx, str.sqlite_stat1
call fcn.10008d80
test eax, eax
jne 0x1005d111
mov eax, dword [edi]
cmp byte [eax + 0x53], 0
jne 0x1005d111
mov eax, dword [edi + 0x74]
lea ecx, [eax + eax*4]
mov eax, dword [edi + 0x70]
mov byte [eax + ecx*4 - 0x13], 0xfa
mov dword [eax + ecx*4 - 4], ebx
cmp byte [ebp + 0x24], 0
je 0x1005d12e
mov eax, dword [edi + 0x74]
test eax, eax
jle 0x1005d12e
lea ecx, [eax + eax*4]
mov edx, 4
mov eax, dword [edi + 0x70]
mov word [eax + ecx*4 - 0x12], dx
test esi, esi
js 0x1005d184
cmp esi, dword [ebp + 0xc]
je 0x1005d184
mov ecx, dword [edi + 0x74]
cmp dword [edi + 0x78], ecx
jg 0x1005d155
push 0
push 0
push esi
mov edx, 0x80
mov ecx, edi
call fcn.10029250
add esp, 0xc
jmp 0x1005d184
lea eax, [ecx + 1]
mov dword [edi + 0x74], eax
lea ecx, [ecx + ecx*4]
mov eax, dword [edi + 0x70]
mov dword [eax + ecx*4], 0x80
mov dword [eax + ecx*4 + 4], esi
mov dword [eax + ecx*4 + 8], 0
mov dword [eax + ecx*4 + 0xc], 0
mov dword [eax + ecx*4 + 0x10], 0
mov eax, dword [edi + 0x74]
test eax, eax
jle 0x1005d1a3
mov edx, 2
xor ecx, ecx
cmp byte [ebp + 0x24], dl
cmovne edx, ecx
lea ecx, [eax + eax*4]
mov eax, dword [edi + 0x70]
mov word [eax + ecx*4 - 0x12], dx
mov ecx, dword [esp + 0x10]
mov edx, ebx
push 0
push 0
push dword [esp + 0x1c]
push 0
call fcn.100655b0
push dword [esp + 0x28]
movzx eax, byte [ebp + 0x20]
mov edx, dword [ebp + 8]
mov ecx, dword [esp + 0x24]
push eax
push dword [esp + 0x2c]
push ebx
push 2
push 0
push 0x7f
call fcn.10082750
mov ecx, dword [edi + 0xc]
add esp, 0x2c
mov edx, dword [esp + 0x18]
not edx
mov eax, dword [ecx + 0x3c]
add eax, dword [ecx + 0x38]
jns 0x1005d1fe
push edx
mov edx, edi
call fcn.10029c70
add esp, 4
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [edi + 0x74]
mov ecx, dword [ecx + 0x40]
pop edi
pop esi
pop ebx
mov dword [ecx + edx*4], eax
mov esp, ebp
pop ebp
ret