Function at 0x4896c0
Capabilities:
Reference sql statements
Resolve function by parsing pe exports

Disassembly:
sub esp, 0xec
mov eax, dword [0x65ada4]
xor eax, esp
mov dword [esp + 0xe8], eax
mov eax, dword [esp + 0xf0]
push ebx
push ebp
mov ebx, ecx
cmp byte [ebx + 0x184f8], 0
push esi
push edi
mov dword [esp + 0x78], eax
mov byte [ebx + 0x11], 1
jne 0x4897e8
mov esi, dword [str.public]
mov ecx, 0x5acad0
lea eax, [esi + 0x80]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x489727
test dl, dl
je 0x489723
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x489727
add eax, 2
add ecx, 2
test dl, dl
jne 0x489707
xor eax, eax
jmp 0x48972c
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x48973f
push str.external_options
push str.alter
jmp 0x4898d3
mov ecx, dword [ebx + 0x18415]
lea edx, [esp + 0x78]
push edx
push 2
lea eax, [esp + 0x2c]
push eax
push fcn.00472210
push 0
lea edi, [ebx + 0x184f3]
push str.UPDATE____sysexternal__SET_rname__WHERE_rkey_
mov dword [esp + 0x90], ecx
mov dword [esp + 0x94], edi
call fcn.0050df80
mov esi, eax
add esp, 0x18
test esi, esi
jne 0x489b0c
cmp dword [esp + 0x24], eax
jne 0x489b26
cmp dword [edi], 0xfffffffb
jne 0x4897c5
lea ecx, [esp + 0x78]
push ecx
push 2
lea edx, [esp + 0x2c]
push edx
push fcn.00472210
push eax
push str.INSERT_INTO____sysexternal___rname_rkey_rtype_owner_enabled_debug_lastmodified_comment__VALUES______0_1_TRUE_FALSE_CURRENTDATE_SecurityManager_Permissions_
call fcn.0050df80
mov esi, eax
add esp, 0x18
test esi, esi
jne 0x489b0c
cmp dword [esp + 0x24], eax
jne 0x489b26
add ebx, 0x18394
push ebx
push 0x7dd
push 0x40d8
call fcn.00406f10
add esp, 0xc
mov eax, 0x40d8
jmp 0x489b68
lea eax, [esp + 0x10]
push eax
push 1
lea ecx, [esp + 0x38]
push ecx
lea edx, [esp + 0x28]
push edx
xor ebp, ebp
push fcn.00472210
lea edi, [ebx + 0x18394]
push ebp
push str.SELECT_rkey_rtype_owner_FROM____sysexternal__WHERE_rname_
mov dword [esp + 0x34], ebp
mov byte [esp + 0x33], 0
mov dword [esp + 0x38], ebp
mov dword [esp + 0x3c], edi
mov dword [esp + 0x2c], edi
call fcn.0050dfb0
mov esi, eax
add esp, 0x1c
cmp esi, ebp
jne 0x489b0c
mov eax, dword [esp + 0x30]
test eax, eax
je 0x489b2a
movzx ecx, word [eax]
cmp cx, word [eax + 2]
jne 0x48984c
xor ecx, ecx
jmp 0x489851
movsx ecx, cx
add ecx, eax
mov ecx, dword [ecx]
mov dword [esp + 0x2c], ecx
movzx ecx, word [eax + 4]
cmp cx, word [eax + 6]
jne 0x489865
xor ecx, ecx
jmp 0x48986a
movsx ecx, cx
add ecx, eax
mov edx, dword [esp + 0x1c]
mov edi, dword [ecx]
push edx
call fcn.0050dec0
mov esi, eax
add esp, 4
test esi, esi
jne 0x489b0c
mov esi, dword [str.public]
mov dword [esp + 0x1c], ebp
cmp dword [esi + 0x120], edi
je 0x4898f0
mov ecx, 0x5acad0
lea eax, [esi + 0x80]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x4898c0
test dl, dl
je 0x4898bc
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x4898c0
add eax, 2
add ecx, 2
test dl, dl
jne 0x4898a0
xor eax, eax
jmp 0x4898c5
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x4898f0
mov eax, dword [esp + 0x20]
push eax
push str.alter_external_resource
push esi
push 0x7dd
push 0x1f69
call fcn.00406f10
add esp, 0x14
mov eax, 0x1f69
jmp 0x489b68
mov edi, dword [sym.imp.MSVCR90.dll_sprintf]
lea ecx, [esp + 0x80]
mov edx, ecx
push str.UPDATE____sysexternal__SET
push edx
mov dword [esp + 0x18], ecx
call edi
add dword [esp + 0x18], eax
lea esi, [ebx + 0x184fb]
add esp, 8
cmp byte [esi], 0x81
je 0x489944
mov eax, dword [esp + 0x10]
push str.enabled_
push eax
call edi
add esp, 8
add dword [esp + 0x10], eax
mov dword [esp + 0x18], 1
mov ebp, dword [esp + 0x18]
mov dword [esp + 0x34], esi
mov al, 1
jmp 0x489948
mov al, byte [esp + 0x17]
cmp byte [ebx + 0x184f9], 0x81
lea esi, [ebx + 0x184f9]
je 0x48998b
test al, al
je 0x489966
mov ecx, dword [esp + 0x10]
mov byte [ecx], 0x2c
inc dword [esp + 0x10]
mov edx, dword [esp + 0x10]
push str.debug_
push edx
call edi
add dword [esp + 0x18], eax
add esp, 8
mov dword [esp + ebp*4 + 0x34], esi
inc ebp
mov byte [esp + 0x17], 1
mov al, byte [esp + 0x17]
mov dword [esp + 0x18], ebp
cmp dword [ebx + 0x184ef], 0
je 0x4899ce
test al, al
je 0x4899a3
mov eax, dword [esp + 0x10]
mov byte [eax], 0x2c
inc dword [esp + 0x10]
mov ecx, dword [esp + 0x10]
push str.comment_
push ecx
call edi
mov edx, dword [ebx + 0x184ef]
add dword [esp + 0x18], eax
add esp, 8
mov dword [esp + ebp*4 + 0x34], edx
inc ebp
mov byte [esp + 0x17], 1
mov al, byte [esp + 0x17]
mov dword [esp + 0x18], ebp
mov ecx, dword [esp + 0x78]
cmp byte [ecx], 0
je 0x489ac0
test al, al
je 0x4899ea
mov eax, dword [esp + 0x10]
mov byte [eax], 0x2c
inc dword [esp + 0x10]
cmp byte [ecx + 0x200], 0
je 0x489a86
lea ebp, [ecx + 0x201]
lea ecx, [esp + 0x48]
push ecx
push ebp
call fcn.0056a9c0
mov esi, eax
add esp, 8
test esi, esi
jne 0x489b0c
mov edx, dword [esp + 0x60]
push eax
push edx
push ebp
push str.RBLOB00
call fcn.00424830
mov esi, eax
add esp, 0x10
test esi, esi
jne 0x489b0c
mov eax, dword [esp + 0x10]
push str.lastmodifiedCURRENTDATE_
push eax
call edi
mov ecx, dword [esp + 0x18]
add ecx, eax
add esp, 8
cmp byte [ebx + 0x184f8], 0
mov dword [esp + 0x10], ecx
jle 0x489a63
push str.rblobBLOB_RBLOB00_sblobNULL
push ecx
call edi
mov ebp, dword [esp + 0x20]
jmp 0x489a92
push str.sblobBLOB_RBLOB00_rblobNULL
push ecx
call edi
mov cl, byte [ebx + 0x184f8]
add dword [esp + 0x18], eax
mov ebp, dword [esp + 0x20]
add esp, 8
neg cl
mov byte [ebx + 0x184f8], cl
jmp 0x489a99
mov edx, dword [esp + 0x10]
push str.lastmodifiedNULL_rblobNULL_sblobNULL
push edx
call edi
add esp, 8
add dword [esp + 0x10], eax
mov al, byte [ebx + 0x184f8]
test al, al
jge 0x489aab
neg al
mov byte [ebx + 0x184f8], al
lea eax, [esp + 0x2c]
push 0
push eax
call fcn.004629d0
mov esi, eax
add esp, 8
test esi, esi
jne 0x489b0c
mov ecx, dword [esp + 0x10]
push str._WHERE_rkey_
push ecx
call edi
add dword [esp + 0x18], eax
lea edx, [esp + 0x34]
mov dword [esp + ebp*4 + 0x3c], edx
lea eax, [esp + 0x3c]
push eax
inc ebp
push ebp
lea ecx, [esp + 0x34]
push ecx
push fcn.00472210
lea edx, [esp + 0x98]
push 0
push edx
call fcn.0050df80
mov esi, eax
add esp, 0x20
test esi, esi
jne 0x489b0c
call fcn.00425020
mov esi, eax
test esi, esi
je 0x489b1f
push 0x7dd
push 0
call fcn.00406f10
add esp, 8
mov eax, esi
jmp 0x489b68
cmp dword [esp + 0x24], 0
je 0x489b39
xor eax, eax
jmp 0x489b68
mov eax, dword [esp + 0x1c]
push eax
call fcn.0050dec0
add esp, 4
jmp 0x489b3d
mov edi, dword [esp + 0x20]
movzx edx, byte [ebx + 0x184f8]
lea ecx, [esp + 0x78]
push ecx
push edx
call fcn.00461570
push eax
push edi
push 0x7dd
push 0x40db
call fcn.00406f10
add esp, 0x18
mov eax, 0x40db
mov ecx, dword [esp + 0xf8]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00586584
add esp, 0xec
ret