Function at 0x65235130
Capabilities:
Reference sql statements

Disassembly:
mov eax, dword [esi + 0x1e8]
push ebx
push str.CREATE_TABLE_extract_pubs___publication_id_SMALLINT_NOT_NULL__creator_SMALLINT_NOT_NULL__PRIMARY_KEY___publication_id____
push eax
call fcn.65262b60
mov eax, dword [esi + 0x7c]
mov ecx, dword [esi]
add esp, 8
test eax, eax
lea ebx, [esi + 0x278]
jne 0x6523515f
mov edx, dword [ecx + 0x3b]
push edx
push str.INSERT_INTO_extract_pubs_SELECT_DISTINCT_p.publication_id__creator_FROM_SYS.SYSPUBLICATION_p__SYS.SYSSUBSCRIPTION_s__SYS.SYSREMOTEUSER_ru__SYS.SYSUSERPERM_up_WHERE_p.publication_id__s.publication_id_AND_s.user_id__ru.user_id_AND_ru.user_id__up.user_id_AND_user_name___s
jmp 0x65235168
mov edx, dword [ecx + 0x62]
push edx
push str.INSERT_INTO_extract_pubs_SELECT_DISTINCT_p.publication_id__creator_FROM_SYS.SYSPUBLICATION_p__SYS.SYSSYNC_s_WHERE_p.publication_id__s.publication_id_AND_s.type_in__S_D_AND_site_name___s
push ebx
call fcn.65237150
push eax
mov eax, dword [esi + 0x1e8]
push eax
call fcn.65262b60
mov ecx, dword [esi + 0x1e8]
add esp, 0x14
push str.CREATE_TABLE_extract_tables___table_id_INT_NOT_NULL__creator__SMALLINT_NOT_NULL__PRIMARY_KEY___table_id____
push ecx
call fcn.65262b60
mov edx, dword [esi + 0x1e8]
push str.INSERT_INTO_extract_tables_SELECT_t.table_id__t.creator_FROM_SYS.SYSTABLE_t_WHERE_EXISTS__SELECT_a.publication_id_FROM_SYS.SYSARTICLE_a__extract_pubs_ep_WHERE_t.table_id__a.table_id_AND_a.publication_id__ep.publication_id___OR_t.table_type__GBL_TEMP
push edx
call fcn.65262b60
mov eax, dword [esi + 0x1e8]
push str.CREATE_TABLE_extract_columns___table_id____INT_NOT_NULL__column_id___SMALLINT_NOT_NULL__column_name_CHAR_128__NOT_NULL__PRIMARY_KEY___table_id__column_id____
push eax
call fcn.65262b60
mov ecx, dword [esi + 0x1e8]
push str.INSERT_INTO_extract_columns_SELECT_table_id__column_id__column_name_FROM_SYS.SYSCOLUMN_c_WHERE_table_id_IN__SELECT_table_id_FROM_extract_tables__AND______column_id_IN__SELECT_column_id_FROM_SYS.SYSARTICLECOL_a_WHERE_a.table_id__c.table_id_AND_a.publication_id_IN__SELECT_publication_id_FROM_extract_pubs_____OR__NOT_EXISTS__SELECT_column_id_FROM_SYS.SYSARTICLECOL_a_WHERE_a.table_id__c.table_id_AND_a.publication_id_IN__SELECT_publication_id_FROM_extract_pubs______ORDER_BY_table_id__column_id
push ecx
call fcn.65262b60
mov edx, dword [esi + 0x1e8]
push str.CREATE_TABLE_splayed_indexes___table_id_tINT_NOT_NULL__index_id_tINT_NOT_NULL__PRIMARY_KEY__table_id__index_id____
push edx
call fcn.65262b60
mov eax, dword [esi + 0x1e8]
push str.insert_into_splayed_indexes_SELECT_ind.table_id__ind.index_id_FROM_SYS.SYSINDEX_ind_WHERE_ind.table_id_IN__SELECT_et.table_id_from_extract_tables_et__AND__select_count___from_SYS.SYSIXCOL_ixc_where_ixc.table_idind.table_id_and_ixc.index_idind.index_id____select_count___from_SYS.SYSIXCOL_ixc__extract_columns_ec_where_ixc.table_idind.table_id_and_ixc.index_idind.index_id_and_ec.table_idixc.table_id_and_ec.column_idixc.column_id__
push eax
call fcn.65262b60
mov ecx, dword [esi + 0x1e8]
push str.CREATE_TABLE_extract_users___user_id_SMALLINT_NOT_NULL__PRIMARY_KEY___user_id____
push ecx
call fcn.65262b60
mov eax, dword [esi + 0x7c]
add esp, 0x38
test eax, eax
mov eax, dword [esi + 0x50]
jne 0x6523525b
test eax, eax
push edi
mov edi, str.OR_user_id_IN__SELECT_creator_FROM_SYS.SYSJAVACLASS_
jne 0x65235211
mov edi, 0x6528b61a
mov eax, dword [esi]
mov cl, byte [eax + 0x49]
test cl, 0x10
mov edx, 0x6528b61a
jne 0x65235225
mov edx, str.OR_user_id_IN__SELECT_creator_FROM_SYS.SYSTABLE_WHERE_table_type__VIEW_
test cl, 4
mov ecx, 0x6528b61a
jne 0x65235234
mov ecx, str.OR_user_id_IN__SELECT_creator_FROM_SYS.SYSPROCEDURE_
mov eax, dword [eax + 0x3b]
push eax
push edi
push edx
push ecx
push eax
push eax
push str.INSERT_INTO_extract_users_SELECT_user_id_FROM_SYS.SYSUSERPERM_WHERE_user_name_IN__SYS__DBA__PUBLIC__dbo__OR_user_name___s_OR_publishauth__Y_OR_user_group__Y_OR_user_id_IN__SELECT_group_member_FROM_SYS.SYSGROUP__SYS.SYSUSERPERM_WHERE_group_id__user_id_AND_user_name___s__OR_user_id_IN__SELECT_creator_FROM_extract_tables__OR_user_id_IN__SELECT_creator_FROM_extract_pubs__OR_user_id_IN__SELECT_grantor_FROM_SYS.SYSTABLEPERM__OR_user_id_IN__SELECT_grantor_FROM_SYS.SYSCOLPERM__OR___remotedbaauth__Y_AND_user_id_NOT_IN__SELECT_user_id_FROM_SYS.SYSREMOTEUSER____s__s__s
push ebx
call fcn.65237150
mov edx, dword [esi + 0x1e8]
push eax
push edx
call fcn.65262b60
add esp, 0x28
pop edi
pop ebx
ret
test eax, eax
mov edx, str.OR_user_id_IN__SELECT_creator_FROM_SYS.SYSJAVACLASS_
jne 0x65235269
mov edx, 0x6528b61a
mov eax, dword [esi]
mov al, byte [eax + 0x49]
test al, 0x10
mov ecx, 0x6528b61a
jne 0x6523527c
mov ecx, str.OR_user_id_IN__SELECT_creator_FROM_SYS.SYSTABLE_WHERE_table_type__VIEW_
test al, 4
mov eax, 0x6528b61a
jne 0x6523528a
mov eax, str.OR_user_id_IN__SELECT_creator_FROM_SYS.SYSPROCEDURE_
push edx
push ecx
push eax
push str.INSERT_INTO_extract_users_SELECT_user_id_FROM_SYS.SYSUSERPERM_WHERE_user_name_IN__SYS__DBA__PUBLIC__dbo__OR_user_group__Y_OR_user_id_IN__SELECT_creator_FROM_extract_tables__OR_user_id_IN__SELECT_creator_FROM_extract_pubs__OR_user_id_IN__SELECT_grantor_FROM_SYS.SYSTABLEPERM__OR_user_id_IN__SELECT_grantor_FROM_SYS.SYSCOLPERM__OR___remotedbaauth__Y_AND_user_id_NOT_IN__SELECT_user_id_FROM_SYS.SYSREMOTEUSER____s__s__s
push ebx
call fcn.65237150
mov ecx, dword [esi + 0x1e8]
push eax
push ecx
call fcn.65262b60
add esp, 0x1c
pop ebx
ret