Function at 0x65242130
Capabilities:
Reference sql statements

Disassembly:
sub esp, 8
push ebx
push ebp
mov ebp, dword [esp + 0x14]
mov eax, dword [ebp]
mov cl, byte [eax + 0x24]
mov bl, 0x10
test bl, cl
mov dword [esp + 0xc], 0
mov dword [esp + 8], 1
je 0x6524215e
push ebp
call fcn.65240f50
add esp, 4
mov ecx, dword [ebp]
mov al, byte [ecx + 0x24]
shr al, 4
and al, 1
je 0x65242196
mov edx, dword [ebp + 0x2a4]
test edx, edx
jne 0x65242196
mov ecx, dword [ecx + 0x62]
push ecx
lea edx, [ebp + 0x278]
push str.SELECT_user_name__p.publication_id__publication_name__s.type_____s.site_name___if_s.type__S_then__SELECT__option__FROM_SYS.SYSSYNC_s1_WHERE_s1.publication_id__p.publication_id_AND_s1.type__T___s._option__else__SELECT__option__FROM_SYS.SYSSYNC_s1_WHERE_s1.publication_id__p.publication_id_AND_s1.type__D_AND_s1.site_name_IS_NULL____SELECT__option__FROM_SYS.SYSSYNC_s1_WHERE_s1.publication_id_IS_NULL_AND_s1.type__D_AND_s1.site_name__s.site_name___s._option__endif____if_s.type__S_then_isnull__s.server_connect___SELECT_server_connect_FROM_SYS.SYSSYNC_s1_WHERE_s1.publication_id__p.publication_id_AND_s1.type__T___s.server_connect___else_isnull__s.server_connect___SELECT_server_connect_FROM_SYS.SYSSYNC_s1_WHERE_s1.publication_id_IS_NULL_AND_s1.type__D_AND_s1.site_name__s.site_name____SELECT_server_connect_FROM_SYS.SYSSYNC_s1_WHERE_s1.publication_id__p.publication_id_AND_s1.type__D_AND_s1.site_name_IS_NULL____endif____if_s.type__S_then_isnull__s.server_conn_type___SELECT_server_conn_type_FROM_SYS.SYSSYNC_s1_WHERE_s1.publication_id__p.publication_id_AND_s1.type__T___s.server_conn_type___else_isnull__s.server_conn_type___SELECT_server_conn_type_FROM_SYS.SYSSYNC_s1_WHERE_s1.publication_id_IS_NULL_AND_s1.type__D_AND_s1.site_name__s.site_name____SELECT_server_conn_type_FROM_SYS.SYSSYNC_s1_WHERE_s1.publication_id__p.publication_id_AND_s1.type__D_AND_s1.site_name_IS_NULL_____endif_____FROM_SYS.SYSPUBLICATION_p__SYS.SYSUSERPERM_u__SYS.SYSSYNC_s_WHERE_p.creator__u.user_id_AND_s.type_in__S__D__AND_s.site_name___s_AND_s.publication_id__p.publication_id_AND_p.publication_id_IN___SELECT_publication_id__FROM_extract_pubs___ORDER_BY_p.publication_id_
push edx
call fcn.65237150
push eax
mov eax, dword [ebp + 0x1e8]
push 0x12
push eax
jmp 0x652421d7
test al, al
jne 0x652421df
push str.last_download_time
push str.SYSSYNC
push ebp
call fcn.6523af50
add esp, 0xc
test eax, eax
mov eax, str.s.last_download_time
jne 0x652421bb
mov eax, 0x6528b704
push eax
lea ecx, [ebp + 0x278]
push str.SELECT__select_user_name_from_SYS.SYSUSERPERM_u_where_u.user_id__p.creator__as_user_name__s.publication_id__if_s.publication_id_is_NULL_then_NULL_else_publication_name_endif__if_s.type__S_or__p.type__R_AND_s.type__D__or__p.type_IS_NULL_AND_s.type__D__then_s.type_else_X_endif__s.progress__s.site_name__s._option___s.server_connect__s.server_conn_type___s__s.sync_id_FROM_SYS.SYSSYNC_s_left_outer_join_SYS.SYSPUBLICATION_p_on_p.publication_id__s.publication_id_WHERE____s.type__S__OR____p.type__S_AND_s.type__D__OR____p.type__R_AND_s.type__D__OR____p.type_IS_NULL_and_s.type__D____ORDER_BY_s.sync_id
push ecx
call fcn.65237150
mov edx, dword [ebp + 0x1e8]
push eax
push 0x12
push edx
call fcn.65261aa0
add esp, 0x18
mov eax, dword [ebp]
mov al, byte [eax + 0x24]
shr al, 4
and al, 1
je 0x652421f6
mov ecx, dword [ebp + 0x2a4]
test ecx, ecx
je 0x652421fe
test al, al
jne 0x652426ee
mov ecx, dword [ebp + 0x1e8]
push 0x12
push ecx
call fcn.65262260
add esp, 8
test eax, eax
je 0x652426dd
push esi
push edi
lea esp, [esp]
mov edx, dword [ebp + 0x1e8]
push 3
push 0x12
push edx
call fcn.65261720
add esp, 0xc
test eax, eax
jne 0x65242697
mov eax, dword [ebp + 0x1e8]
push 3
push 0x12
push eax
mov edi, 0x65294308
call fcn.652617d0
add esp, 0xc
mov esi, eax
mov ecx, 2
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
je 0x65242289
mov eax, dword [ebp + 0x1e8]
push 3
push 0x12
push eax
mov edi, 0x65290118
call fcn.652617d0
add esp, 0xc
mov esi, eax
mov ecx, 2
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
jne 0x6524254e
mov eax, dword [ebp]
test byte [eax + 0x24], bl
jne 0x652422cd
mov ecx, dword [ebp + 0x1e8]
push 0xa
push 0x12
push ecx
mov dword [esp + 0x20], 1
lea esi, [ebp + 0x128]
call fcn.652617d0
push eax
push str.CALL_dbo.sa_sync___s___SET_NEXTSYNCID____
push 0xf
push esi
call fcn.652371f0
push 0x6528fa54
push 0xf
push esi
call fcn.652371f0
add esp, 0x28
mov edx, dword [ebp + 0x1e8]
push 3
push 0x12
push edx
mov edi, 0x65294308
call fcn.652617d0
add esp, 0xc
mov esi, eax
mov ecx, 2
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
jne 0x65242351
mov ecx, dword [ebp]
test byte [ecx + 0x24], bl
jne 0x65242351
mov edx, dword [ebp + 0x1e8]
push 2
push 0x12
push edx
call fcn.652617d0
add esp, 0xc
push eax
mov eax, dword [ebp + 0x1e8]
push 0
push 0x12
push eax
call fcn.652617d0
mov ecx, dword [ebp + 0x1e8]
add esp, 0xc
push eax
push 5
push 0x12
push ecx
call fcn.652617d0
add esp, 0xc
push eax
push str.CREATE_SYNCHRONIZATION_SITE___s__USING___s_.__s_
lea edx, [ebp + 0x128]
push 0xf
push edx
call fcn.652371f0
add esp, 0x18
jmp 0x6524246a
mov eax, dword [ebp + 0x1e8]
push 2
push 0x12
push eax
call fcn.65261720
add esp, 0xc
test eax, eax
jne 0x65242370
mov ecx, dword [ebp]
test byte [ecx + 0x24], bl
je 0x652423e0
mov edx, dword [ebp + 0x1e8]
push 5
push 0x12
push edx
call fcn.65261720
add esp, 0xc
test eax, eax
jne 0x652423e0
mov eax, dword [ebp]
test byte [eax + 0x24], bl
je 0x65242397
mov eax, dword [esp + 0x10]
test eax, eax
je 0x652423e0
mov ecx, dword [ebp + 0x1e8]
push 5
push 0x12
push ecx
lea esi, [ebp + 0x128]
call fcn.652617d0
push eax
push str.CREATE_SYNCHRONIZATION_USER___s_
push 0xf
push esi
call fcn.652371f0
mov edx, dword [ebp]
mov al, byte [edx + 0x24]
add esp, 0x1c
test bl, al
je 0x652423e0
push 0x6528fa54
push 0xf
push esi
call fcn.652371f0
add esp, 0xc
mov dword [esp + 0x10], 0
mov eax, dword [ebp + 0x1e8]
push 2
push 0x12
push eax
call fcn.65261720
add esp, 0xc
test eax, eax
jne 0x6524246a
mov ecx, dword [ebp + 0x1e8]
push 2
push 0x12
push ecx
lea esi, [ebp + 0x128]
call fcn.652617d0
mov edx, dword [ebp + 0x1e8]
add esp, 0xc
push eax
push 0
push 0x12
push edx
call fcn.652617d0
add esp, 0xc
push eax
push str.CREATE_SYNCHRONIZATION_SUBSCRIPTION_TO___s_.__s_
push 0xf
push esi
call fcn.652371f0
mov eax, dword [ebp + 0x1e8]
push 5
push 0x12
push eax
call fcn.65261720
add esp, 0x20
test eax, eax
jne 0x6524246a
mov ecx, dword [ebp + 0x1e8]
push 5
push 0x12
push ecx
call fcn.652617d0
push eax
push str._r_n________FOR___s_
push 0xf
push esi
call fcn.652371f0
add esp, 0x1c
mov edx, dword [ebp + 0x1e8]
push 8
push 0x12
push edx
call fcn.65261720
add esp, 0xc
test eax, eax
jne 0x652424a8
mov eax, dword [ebp + 0x1e8]
push 8
push 0x12
push eax
call fcn.652617d0
push eax
push str._r_n________TYPE__s
lea ecx, [ebp + 0x128]
push 0xf
push ecx
call fcn.652371f0
add esp, 0x1c
mov edx, dword [ebp + 0x1e8]
push 7
push 0x12
push edx
call fcn.65261720
add esp, 0xc
test eax, eax
jne 0x652424e6
mov eax, dword [ebp + 0x1e8]
push 7
push 0x12
push eax
call fcn.652617d0
push eax
push str._r_n________ADDRESS__s
lea ecx, [ebp + 0x128]
push 0xf
push ecx
call fcn.652371f0
add esp, 0x1c
mov edx, dword [ebp + 0x1e8]
push 6
push 0x12
push edx
call fcn.65261720
add esp, 0xc
test eax, eax
jne 0x65242538
mov eax, dword [ebp + 0x1e8]
push 6
push 0x12
push eax
call fcn.652617d0
add esp, 0xc
call fcn.65240ec0
mov esi, eax
test esi, esi
je 0x65242538
push esi
push str._r_n________OPTION__s
lea ecx, [ebp + 0x128]
push 0xf
push ecx
call fcn.652371f0
push esi
call fcn.652440f0
add esp, 0x14
push 0x6528fa54
lea edx, [ebp + 0x128]
push 0xf
push edx
call fcn.652371f0
add esp, 0xc
mov eax, dword [ebp]
test byte [eax + 0x24], bl
jne 0x65242697
mov ecx, dword [ebp + 0x1e8]
push 4
push 0x12
push ecx
call fcn.65261720
add esp, 0xc
test eax, eax
jne 0x65242697
mov edx, dword [ebp + 0x1e8]
push 5
push 0x12
push edx
call fcn.65261720
add esp, 0xc
test eax, eax
jne 0x65242697
mov eax, dword [ebp + 0x1e8]
push 1
push 0x12
push eax
call fcn.65261720
add esp, 0xc
test eax, eax
jne 0x65242697
mov ecx, dword [ebp + 0x1e8]
push 4
push 0x12
push ecx
call fcn.65261720
add esp, 0xc
test eax, eax
jne 0x65242621
mov edx, dword [ebp + 0x1e8]
push 4
push 0x12
push edx
lea esi, [ebp + 0x128]
call fcn.652617d0
add esp, 0xc
push eax
mov eax, dword [ebp + 0x1e8]
push 5
push 0x12
push eax
call fcn.652617d0
mov ecx, dword [ebp + 0x1e8]
add esp, 0xc
push eax
push 1
push 0x12
push ecx
call fcn.652617d0
add esp, 0xc
push eax
push str.CALL_dbo.sa_sync_sub___s___s__set_progress___s__
push 0xf
push esi
call fcn.652371f0
push 0x6528fa54
push 0xf
push esi
call fcn.652371f0
add esp, 0x24
mov edx, dword [ebp + 0x1e8]
push 9
push 0x12
push edx
call fcn.65261720
add esp, 0xc
test eax, eax
jne 0x65242697
mov eax, dword [ebp + 0x1e8]
push 9
push 0x12
push eax
lea esi, [ebp + 0x128]
call fcn.652617d0
mov ecx, dword [ebp + 0x1e8]
add esp, 0xc
push eax
push 5
push 0x12
push ecx
call fcn.652617d0
mov edx, dword [ebp + 0x1e8]
add esp, 0xc
push eax
push 1
push 0x12
push edx
call fcn.652617d0
add esp, 0xc
push eax
push str.CALL_dbo.sa_sync_sub___s___s__set_lastdownloadtime___s__
push 0xf
push esi
call fcn.652371f0
push 0x6528fa54
push 0xf
push esi
call fcn.652371f0
add esp, 0x24
mov eax, dword [ebp + 0x1e8]
push 0x12
push eax
call fcn.65262260
add esp, 8
test eax, eax
jne 0x65242220
mov eax, dword [esp + 0x14]
test eax, eax
je 0x652426db
push str.CALL_dbo.sa_sync__0___RESET_NEXTSYNCID____
lea esi, [ebp + 0x128]
push 0xf
push esi
call fcn.652371f0
push 0x6528fa54
push 0xf
push esi
call fcn.652371f0
add esp, 0x18
pop edi
pop esi
mov ecx, dword [ebp + 0x1e8]
push 0x12
push ecx
call fcn.65261d80
add esp, 8
pop ebp
pop ebx
add esp, 8
ret