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

Disassembly:
sub esp, 0x64
mov eax, dword [esp + 0x6c]
mov edx, dword [eax]
push ebx
mov ebx, ecx
mov ecx, dword [ebx]
push ebp
mov ebp, dword [esp + 0x70]
mov dword [esp + 0x30], edx
mov edx, dword [eax + 8]
mov dword [esp + 0x10], ecx
mov ecx, dword [eax + 4]
push esi
xor esi, esi
mov dword [esp + 0x38], ecx
mov ecx, dword [eax + 0xc]
mov dword [esp + 0x3c], edx
mov edx, dword [eax + 0x10]
push edi
mov edi, dword [ebp + 0x34]
mov dword [esp + 0x44], ecx
mov dword [esp + 0x48], edx
mov dword [esp + 0x10], esi
mov dword [esp + 0x24], esi
mov dword [esp + 0x20], esi
mov dword [esp + 0x1c], esi
cmp dword [edi + 0x30], esi
je 0x1005b5ca
movzx eax, byte [ebp + 4]
sub eax, 0x74
je 0x1005b5ab
sub eax, 1
je 0x1005b5a4
sub eax, 1
je 0x1005b59d
mov eax, str.UNION
jmp 0x1005b5b0
mov eax, str.INTERSECT
jmp 0x1005b5b0
mov eax, str.EXCEPT
jmp 0x1005b5b0
mov eax, str.UNION_ALL
push eax
push str.ORDER_BY_clause_should_come_after__s_not_before
mov edi, ebx
call fcn.100320c0
add esp, 8
mov esi, 1
jmp 0x1005bd20
cmp dword [edi + 0x3c], esi
je 0x1005b616
movzx eax, byte [ebp + 4]
sub eax, 0x74
je 0x1005b5f7
sub eax, 1
je 0x1005b5f0
sub eax, 1
je 0x1005b5e9
mov eax, str.UNION
jmp 0x1005b5fc
mov eax, str.INTERSECT
jmp 0x1005b5fc
mov eax, str.EXCEPT
jmp 0x1005b5fc
mov eax, str.UNION_ALL
push eax
push str.LIMIT_clause_should_come_after__s_not_before
mov edi, ebx
call fcn.100320c0
add esp, 8
mov esi, 1
jmp 0x1005bd20
mov eax, ebx
call fcn.1003c530
cmp byte [esp + 0x38], 0xc
mov dword [esp + 0x78], eax
jne 0x1005b65e
mov eax, dword [ebp]
mov ecx, dword [eax]
mov edx, dword [esp + 0x3c]
mov esi, dword [esp + 0x78]
push ecx
push edx
push 0x39
call fcn.1003a180
mov eax, esi
mov eax, dword [eax + 4]
add esp, 0xc
test eax, eax
je 0x1005b657
mov ecx, esi
mov ecx, dword [ecx + 0x20]
lea edx, [ecx + ecx*4]
mov byte [eax + edx*4 - 0x11], 8
mov byte [esp + 0x38], 0xe
xor esi, esi
movzx eax, word [ebp + 6]
test eax, 0x100
je 0x1005b680
lea eax, [esp + 0x38]
push eax
push ebx
mov eax, ebp
call fcn.10038950
add esp, 8
mov esi, eax
jmp 0x1005bd20
mov ecx, dword [ebp]
mov edx, dword [edi]
mov ecx, dword [ecx]
cmp ecx, dword [edx]
je 0x1005b69e
mov eax, ebp
mov ecx, ebx
call fcn.10034560
mov esi, 1
jmp 0x1005bd20
test eax, 0x800
je 0x1005b6b6
lea edx, [esp + 0x38]
push edx
push ebp
push ebx
call fcn.10058f50
jmp 0x1005bbe8
cmp dword [ebp + 0x30], esi
je 0x1005b6d2
mov eax, dword [esp + 0x7c]
push eax
push ebp
push ebx
call fcn.10057f50
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x64
ret
movzx eax, byte [ebp + 4]
sub eax, 0x73
je 0x1005ba09
sub eax, 1
je 0x1005b912
sub eax, 1
je 0x1005ba09
mov eax, dword [ebx + 0x44]
mov esi, dword [esp + 0x78]
lea ecx, [eax + 1]
push 0
mov dword [esp + 0x20], ecx
push eax
inc ecx
push 0x39
mov dword [esp + 0x20], eax
mov dword [ebx + 0x44], ecx
call fcn.1003a180
mov dword [ebp + 0x10], eax
add esp, 0xc
mov eax, ebp
call fcn.10012b80
or word [eax + 6], 8
mov ecx, dword [esp + 0x14]
mov edx, dword [ebx + 0x1d4]
add eax, 6
lea eax, [esp + 0x4c]
push eax
xor esi, esi
push edi
push ebx
mov byte [esp + 0x58], 1
mov dword [esp + 0x5c], ecx
mov byte [esp + 0x59], 0
mov dword [esp + 0x60], esi
mov dword [esp + 0x64], esi
mov dword [esp + 0x2c], edx
call fcn.10075680
add esp, 0xc
mov dword [esp + 0x10], eax
cmp eax, esi
jne 0x1005bd1c
mov ecx, dword [esp + 0x1c]
push esi
mov esi, dword [esp + 0x7c]
push ecx
push 0x39
call fcn.1003a180
mov edx, dword [ebp + 0x40]
mov esi, dword [ebp + 0x3c]
add esp, 0xc
mov dword [ebp + 0x14], eax
xor eax, eax
mov dword [esp + 0x2c], edx
lea edx, [esp + 0x4c]
push edx
mov dword [ebp + 0x34], eax
mov dword [ebp + 0x3c], eax
mov dword [ebp + 0x40], eax
mov eax, dword [esp + 0x20]
mov ecx, dword [ebx + 0x1d4]
push ebp
push ebx
mov dword [esp + 0x5c], eax
mov dword [esp + 0x28], ecx
call fcn.10075680
mov ecx, dword [ebp + 0x1c]
mov dword [esp + 0x1c], eax
mov eax, dword [ebp + 0x34]
mov dword [ebp + 0x34], edi
mov dword [esp + 0x30], eax
mov eax, dword [edi + 0x18]
mov edi, dword [edi + 0x1c]
add esp, 0xc
cmp ecx, edi
jb 0x1005b7de
ja 0x1005b7d8
mov edx, dword [ebp + 0x18]
cmp edx, eax
jbe 0x1005b7de
mov dword [ebp + 0x18], eax
mov dword [ebp + 0x1c], edi
mov eax, dword [ebp + 0x3c]
mov ecx, dword [esp + 0x18]
push eax
push ecx
call fcn.100316b0
mov edx, dword [esp + 0x34]
add esp, 8
cmp byte [esp + 0x38], 9
mov dword [ebp + 0x3c], esi
mov dword [ebp + 0x40], edx
jne 0x1005b827
mov eax, dword [ebp + 0x34]
mov ecx, ebp
test eax, eax
je 0x1005b819
lea esp, [esp]
mov ecx, eax
mov eax, dword [ecx + 0x34]
test eax, eax
jne 0x1005b810
mov eax, dword [ecx]
push eax
push 0
push ebx
call fcn.1004ad80
add esp, 0xc
mov edi, dword [esp + 0x78]
mov eax, edi
call fcn.10037070
mov esi, eax
mov eax, edi
mov dword [esp + 0x2c], esi
call fcn.10037070
mov dword [esp + 0x28], eax
push esi
push ebp
mov eax, ebx
call fcn.10042240
mov ecx, dword [esp + 0x1c]
push esi
push ecx
push 0x6c
mov esi, edi
call fcn.1003a180
add esp, 0x14
mov eax, ebx
call fcn.100133b0
mov edx, dword [esp + 0x14]
push eax
push edx
push 0x65
mov dword [esp + 0x3c], eax
call fcn.1003a180
mov esi, dword [esp + 0x3c]
add esp, 0xc
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0x28]
push 0
push esi
push eax
mov eax, dword [esp + 0x20]
inc eax
push eax
push 0x44
mov eax, edi
call fcn.1003f420
add esp, 0x14
mov edx, ebx
call fcn.10013380
mov ecx, dword [esp + 0x2c]
mov esi, dword [esp + 0x28]
mov eax, dword [esp + 0x14]
push ecx
mov ecx, dword [ebp]
push esi
lea edx, [esp + 0x40]
push edx
push 0
push 0
push eax
push ecx
push ebp
call fcn.10055890
push esi
mov ecx, edi
call fcn.10014570
mov edx, dword [esp + 0x58]
mov eax, dword [esp + 0x38]
add esp, 0x24
push edx
push eax
push 9
mov esi, edi
call fcn.1003a180
mov ecx, dword [esp + 0x38]
add esp, 0xc
push ecx
mov ecx, edi
call fcn.10014570
mov eax, dword [esp + 0x18]
add esp, 4
push 0
inc eax
push eax
push 0x3d
call fcn.1003a180
add esp, 0xc
mov edx, dword [esp + 0x14]
push 0
push edx
jmp 0x1005bbe1
mov eax, dword [ebp + 8]
mov dword [edi + 8], eax
mov ecx, dword [ebp + 0xc]
mov dword [edi + 0xc], ecx
mov edx, dword [ebp + 0x3c]
mov dword [edi + 0x3c], edx
mov eax, dword [ebp + 0x40]
lea edx, [esp + 0x38]
push edx
mov dword [edi + 0x40], eax
mov ecx, dword [ebx + 0x1d4]
push edi
push ebx
mov dword [esp + 0x38], esi
mov dword [esp + 0x2c], ecx
call fcn.10075680
add esp, 0xc
mov dword [esp + 0x10], eax
mov dword [ebp + 0x3c], esi
mov dword [ebp + 0x40], esi
cmp eax, esi
jne 0x1005bd1c
mov dword [ebp + 0x34], esi
mov eax, dword [edi + 8]
mov dword [ebp + 8], eax
mov ecx, dword [edi + 0xc]
mov dword [ebp + 0xc], ecx
cmp eax, esi
je 0x1005b984
mov esi, dword [esp + 0x78]
push eax
push 0x8b
call fcn.1003a1e0
add esp, 8
mov dword [esp + 0x2c], eax
xor esi, esi
mov edx, dword [ebx + 0x1d4]
lea eax, [esp + 0x38]
push eax
push ebp
push ebx
mov dword [esp + 0x28], edx
call fcn.10075680
mov ecx, dword [ebp + 0x34]
mov dword [ebp + 0x34], edi
mov edx, dword [edi + 0x18]
add esp, 0xc
add dword [ebp + 0x18], edx
mov dword [esp + 0x10], eax
mov eax, dword [edi + 0x1c]
adc dword [ebp + 0x1c], eax
mov edi, dword [edi + 0x3c]
mov dword [esp + 0x24], ecx
cmp edi, esi
je 0x1005b9ef
lea ecx, [esp + 0x34]
push ecx
push edi
call fcn.10013990
add esp, 8
test eax, eax
je 0x1005b9ef
mov eax, dword [esp + 0x34]
cmp eax, esi
jle 0x1005b9ef
mov ecx, dword [ebp + 0x1c]
cdq
cmp ecx, edx
jb 0x1005b9ef
ja 0x1005b9e9
mov ecx, dword [ebp + 0x18]
cmp ecx, eax
jbe 0x1005b9ef
mov dword [ebp + 0x18], eax
mov dword [ebp + 0x1c], edx
mov eax, dword [esp + 0x2c]
cmp eax, esi
je 0x1005bbeb
mov edx, dword [esp + 0x78]
call fcn.1001c180
jmp 0x1005bbeb
cmp byte [esp + 0x38], 1
jne 0x1005ba1a
mov edx, dword [esp + 0x3c]
mov dword [esp + 0x14], edx
jmp 0x1005ba4c
mov eax, dword [ebx + 0x44]
mov esi, dword [esp + 0x78]
push 0
push eax
lea ecx, [eax + 1]
push 0x39
mov dword [esp + 0x20], eax
mov dword [ebx + 0x44], ecx
call fcn.1003a180
mov dword [ebp + 0x10], eax
add esp, 0xc
mov eax, ebp
call fcn.10012b80
or word [eax + 6], 8
add eax, 6
xor esi, esi
mov edx, dword [esp + 0x14]
mov eax, dword [ebx + 0x1d4]
lea ecx, [esp + 0x60]
push ecx
push edi
push ebx
mov byte [esp + 0x6c], 1
mov dword [esp + 0x70], edx
mov byte [esp + 0x6d], 0
mov dword [esp + 0x74], esi
mov dword [esp + 0x78], esi
mov dword [esp + 0x2c], eax
call fcn.10075680
add esp, 0xc
mov dword [esp + 0x10], eax
cmp eax, esi
jne 0x1005bd1c
cmp byte [ebp + 4], 0x75
mov edx, dword [ebp + 0x3c]
mov ecx, dword [ebp + 0x40]
sete al
inc al
mov byte [esp + 0x60], al
lea eax, [esp + 0x60]
push eax
mov dword [ebp + 0x34], esi
mov dword [esp + 0x38], edx
mov dword [ebp + 0x3c], esi
mov dword [ebp + 0x40], esi
mov edx, dword [ebx + 0x1d4]
push ebp
push ebx
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x28], edx
call fcn.10075680
mov ecx, dword [ebp + 0x30]
mov edx, dword [esp + 0x24]
add esp, 0xc
push ecx
push edx
mov dword [esp + 0x18], eax
call fcn.10036490
mov eax, dword [ebp + 0x34]
add esp, 8
cmp byte [ebp + 4], 0x73
mov dword [esp + 0x24], eax
mov dword [ebp + 0x34], edi
mov dword [ebp + 0x30], esi
jne 0x1005bafc
mov ecx, dword [edi + 0x18]
add dword [ebp + 0x18], ecx
mov edx, dword [edi + 0x1c]
adc dword [ebp + 0x1c], edx
mov eax, dword [ebp + 0x3c]
mov ecx, dword [esp + 0x18]
push eax
push ecx
call fcn.100316b0
mov eax, dword [esp + 0x38]
mov edx, dword [esp + 0x3c]
mov dword [ebp + 0x40], eax
mov al, byte [esp + 0x40]
add esp, 8
mov dword [ebp + 0x3c], edx
mov dword [ebp + 8], esi
mov dword [ebp + 0xc], esi
cmp al, 1
je 0x1005bbeb
cmp al, 9
jne 0x1005bb56
mov eax, dword [ebp + 0x34]
mov ecx, ebp
cmp eax, esi
je 0x1005bb49
lea ebx, [ebx]
mov ecx, eax
mov eax, dword [ecx + 0x34]
cmp eax, esi
jne 0x1005bb40
mov ecx, dword [ecx]
push ecx
push esi
push ebx
call fcn.1004ad80
add esp, 0xc
mov esi, dword [esp + 0x78]
mov eax, esi
call fcn.10037070
mov edi, eax
mov eax, esi
mov dword [esp + 0x28], edi
call fcn.10037070
mov dword [esp + 0x2c], eax
push edi
push ebp
mov eax, ebx
call fcn.10042240
push edi
mov edi, dword [esp + 0x20]
push edi
push 0x6c
call fcn.1003a180
mov edx, dword [esi + 0x20]
mov eax, dword [esp + 0x3c]
mov ecx, dword [esp + 0x40]
add esp, 0x14
push eax
mov eax, dword [ebp]
push ecx
mov dword [esp + 0x3c], edx
lea edx, [esp + 0x40]
push edx
push 0
push 0
push edi
push eax
push ebp
call fcn.10055890
mov ecx, dword [esp + 0x4c]
push ecx
mov ecx, esi
call fcn.10014570
mov edx, dword [esp + 0x58]
add esp, 0x24
push edx
push edi
push 9
call fcn.1003a180
mov eax, dword [esp + 0x34]
add esp, 0xc
push eax
mov ecx, esi
call fcn.10014570
add esp, 4
push 0
push edi
push 0x3d
call fcn.1003a180
add esp, 0xc
mov al, byte [ebp + 4]
mov edx, dword [esp + 0x1c]
xor ecx, ecx
cmp al, 0x74
setne cl
movzx eax, al
mov edi, ebx
push ecx
mov ecx, dword [esp + 0x24]
push edx
push ecx
call fcn.100429f0
add esp, 0xc
test byte [ebp + 6], 8
je 0x1005bd1c
mov edx, dword [ebp]
mov eax, dword [edx]
push 1
push eax
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x20]
push eax
call fcn.1002acd0
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x1005bc43
mov dword [esp + 0x10], 7
jmp 0x1005bd1c
xor edi, edi
cmp dword [esp + 0x1c], edi
lea ecx, [esi + 0x14]
mov dword [esp + 0x20], ecx
jle 0x1005bc7c
push edi
push ebp
push ebx
call fcn.100532f0
mov edx, dword [esp + 0x2c]
add esp, 0xc
mov dword [edx], eax
test eax, eax
jne 0x1005bc70
mov eax, dword [esp + 0x18]
mov ecx, dword [eax + 8]
mov dword [edx], ecx
add dword [esp + 0x20], 4
inc edi
cmp edi, dword [esp + 0x1c]
jl 0x1005bc52
mov ebx, ebp
mov dword [esp + 0x28], ebp
mov dword [esp + 0x2c], 0
lea ebp, [ebx + 0x10]
mov eax, dword [ebp]
test eax, eax
jl 0x1005bcff
mov ecx, dword [esp + 0x78]
cmp dword [ecx + 0x20], eax
jbe 0x1005bcaf
mov ebx, dword [esp + 0x1c]
mov edi, dword [ecx + 4]
lea edx, [eax + eax*4]
mov dword [edi + edx*4 + 8], ebx
mov ebx, dword [esp + 0x28]
inc dword [esi]
mov edx, dword [ecx]
mov ecx, dword [ecx + 4]
test ecx, ecx
je 0x1005bcdb
cmp byte [edx + 0x41], 0
jne 0x1005bcdb
lea eax, [eax + eax*4]
lea edi, [ecx + eax*4]
movsx eax, byte [edi + 1]
mov ecx, dword [edi + 0x10]
call fcn.1003a090
mov dword [edi + 0x10], esi
mov byte [edi + 1], 0xfa
jmp 0x1005bce7
mov ecx, esi
mov eax, 0xfffffffa
call fcn.1003a090
mov eax, dword [esp + 0x2c]
inc eax
mov dword [ebp], 0xffffffff
add ebp, 4
cmp eax, 2
mov dword [esp + 0x2c], eax
jl 0x1005bc8d
mov ebx, dword [ebx + 0x34]
mov dword [esp + 0x28], ebx
test ebx, ebx
jne 0x1005bc82
add dword [esi], 0xffffffff
jne 0x1005bd1c
push esi
call sym.SQLite.Interop.dll_sqlite3_free
add esp, 4
mov esi, dword [esp + 0x10]
mov ecx, dword [esp + 0x40]
mov eax, dword [esp + 0x7c]
mov edx, dword [esp + 0x44]
mov dword [eax + 8], ecx
mov ecx, dword [esp + 0x18]
mov dword [eax + 0xc], edx
mov eax, dword [esp + 0x24]
push 1
push eax
push ecx
call fcn.1002e080
add esp, 0xc
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
add esp, 0x64
ret