Function at 0x487840
Capabilities:
Reference sql statements

Disassembly:
sub esp, 0x140
mov eax, dword [0x65ada4]
xor eax, esp
mov dword [esp + 0x13c], eax
push ebp
mov ebp, dword [esp + 0x148]
lea eax, [esp + 0x28]
push esi
mov esi, dword [str.public]
mov dword [esp + 0x14], eax
mov ecx, 0x5acad0
lea eax, [esi + 0x80]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x487896
test dl, dl
je 0x487892
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x487896
add eax, 2
add ecx, 2
test dl, dl
jne 0x487876
xor eax, eax
jmp 0x48789b
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x4878d7
mov ecx, dword [ebp + 0x2f]
push ecx
push str.revoke
push esi
push 0x7dd
push 0x1f69
call fcn.00406f10
add esp, 0x14
pop esi
mov eax, 0x1f69
pop ebp
mov ecx, dword [esp + 0x13c]
xor ecx, esp
call fcn.00586584
add esp, 0x140
ret
mov edx, dword [ebp + 0x17a9f]
push ebx
push edi
lea eax, [esp + 0x30]
push eax
lea ecx, [esp + 0x28]
push ecx
lea edi, [ebp + 0x17a9f]
push 1
push 6
mov dword [esp + 0x30], edi
mov dword [esp + 0x34], edx
call fcn.00444330
mov esi, eax
add esp, 0x10
test esi, esi
jne 0x487d65
mov ebx, dword [esp + 0x30]
test ebx, ebx
jne 0x48793b
mov edx, dword [edi]
push edx
push 0x7dd
push 0x1f7f
call fcn.00406f10
push 6
call fcn.004432b0
add esp, 0x10
mov eax, 0x1f7f
jmp 0x487d7a
mov ecx, dword [ebx + 8]
mov eax, dword [str.public]
mov dword [esp + 0x34], ecx
cmp dword [eax + 0x120], ecx
jne 0x487974
push eax
push eax
push 0x7dd
push 0x1f77
call fcn.00406f10
push 6
call fcn.004432b0
add esp, 0x14
mov eax, 0x1f77
jmp 0x487d7a
mov esi, dword [ebp + 0x2f]
push esi
call fcn.00485c00
mov edi, eax
mov eax, dword [ebx + 0x10]
push eax
dec edi
call fcn.00485c00
add esp, 8
cmp eax, edi
jg 0x4879bb
mov ecx, dword [esp + 0x20]
mov edx, dword [ecx]
push esi
push edx
push 0x7dd
push 0x1f60
call fcn.00406f10
push 6
call fcn.004432b0
add esp, 0x14
mov eax, 0x1f60
jmp 0x487d7a
mov ecx, dword [ebx + 0x14]
lea edx, [esp + 0xcc]
mov al, byte [ecx]
mov byte [edx], al
inc ecx
inc edx
test al, al
jne 0x4879c5
push 6
call fcn.004432b0
mov esi, eax
add esp, 4
test esi, esi
jne 0x487d65
mov byte [ebp + 0x11], 1
test edi, edi
jne 0x487d22
mov eax, dword [0x5b46ac]
cmp dword [eax + 0x33e], edi
jne 0x487d22
lea ecx, [esp + 0x1c]
push ecx
push 1
lea edx, [esp + 0x18]
push edx
lea eax, [esp + 0x24]
push eax
push fcn.00472210
push edi
push str.SELECT_tname_FROM____systable__WHERE_owner___
call fcn.0050dfb0
mov esi, eax
add esp, 0x1c
test esi, esi
jne 0x487d65
mov ecx, dword [esp + 0x10]
mov edi, dword [sym.imp.MSVCR90.dll_sprintf]
test ecx, ecx
je 0x487ae0
movzx eax, word [ecx]
cmp ax, word [ecx + 2]
jne 0x487a4d
xor eax, eax
jmp 0x487a50
cwde
add eax, ecx
cmp byte [ebp + 0x182ba], 0
mov dword [esp + 0x14], eax
je 0x487a79
push eax
lea ecx, [esp + 0x3c]
push str.DROP_TABLE__s
push ecx
call edi
lea edx, [esp + 0x44]
push edx
call fcn.0050df00
add esp, 0x10
jmp 0x487aad
lea eax, [esp + 0x14]
push eax
push 1
push 0
push fcn.00472210
push 0
push str.UPDATE____systable__SET_owner1_t_t___WHERE_tname___
call fcn.0050df80
mov esi, eax
add esp, 0x18
test esi, esi
jne 0x487d65
mov ecx, dword [esp + 0x14]
push ecx
call fcn.004c73e0
add esp, 4
mov esi, eax
test esi, esi
jne 0x487d65
push eax
mov eax, dword [esp + 0x1c]
lea edx, [esp + 0x14]
push edx
push eax
call fcn.00490540
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x487d65
mov ecx, dword [esp + 0x10]
test ecx, ecx
jne 0x487a40
mov ecx, dword [esp + 0x18]
push ecx
call fcn.0050dec0
mov esi, eax
add esp, 4
test esi, esi
jne 0x487d65
lea edx, [esp + 0x1c]
push edx
push 1
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x24]
push ecx
push fcn.00472210
push esi
push str.SELECT_name_FROM____sysdomain__WHERE_owner___
call fcn.0050dfb0
mov esi, eax
add esp, 0x1c
test esi, esi
jne 0x487d65
mov ecx, dword [esp + 0x10]
test ecx, ecx
je 0x487bba
movzx eax, word [ecx]
cmp ax, word [ecx + 2]
jne 0x487b3e
xor eax, eax
jmp 0x487b41
cwde
add eax, ecx
cmp byte [ebp + 0x182ba], 0
mov dword [esp + 0x14], eax
je 0x487b6a
push eax
lea edx, [esp + 0x3c]
push str.DROP_DOMAIN__s_CASCADE
push edx
call edi
lea eax, [esp + 0x44]
push eax
call fcn.0050df00
add esp, 0x10
jmp 0x487b87
lea ecx, [esp + 0x14]
push ecx
push 1
push 0
push fcn.00472210
push 0
push str.UPDATE____sysdomain__SET_owner1_t_t___WHERE_name___
call fcn.0050df80
add esp, 0x18
mov esi, eax
test esi, esi
jne 0x487d65
push eax
mov eax, dword [esp + 0x1c]
lea edx, [esp + 0x14]
push edx
push eax
call fcn.00490540
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x487d65
mov ecx, dword [esp + 0x10]
test ecx, ecx
jne 0x487b31
mov ecx, dword [esp + 0x18]
push ecx
call fcn.0050dec0
mov esi, eax
add esp, 4
test esi, esi
jne 0x487d65
lea edx, [esp + 0x1c]
push edx
push 1
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x24]
push ecx
push fcn.00472210
push esi
push str.SELECT_rname_FROM____sysexternal__WHERE_owner___
call fcn.0050dfb0
mov esi, eax
add esp, 0x1c
test esi, esi
jne 0x487d65
mov ecx, dword [esp + 0x10]
test ecx, ecx
je 0x487c99
jmp 0x487c10
movzx eax, word [ecx]
cmp ax, word [ecx + 2]
jne 0x487c1d
xor eax, eax
jmp 0x487c20
cwde
add eax, ecx
cmp byte [ebp + 0x182ba], 0
mov dword [esp + 0x14], eax
je 0x487c49
push eax
lea edx, [esp + 0x3c]
push str.DROP_EXTERNAL__s
push edx
call edi
lea eax, [esp + 0x44]
push eax
call fcn.0050df00
add esp, 0x10
jmp 0x487c66
lea ecx, [esp + 0x14]
push ecx
push 1
push 0
push fcn.00472210
push 0
push str.UPDATE____sysexternal__SET_owner1_t_t___WHERE_rname___
call fcn.0050df80
add esp, 0x18
mov esi, eax
test esi, esi
jne 0x487d65
push eax
mov eax, dword [esp + 0x1c]
lea edx, [esp + 0x14]
push edx
push eax
call fcn.00490540
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x487d65
mov ecx, dword [esp + 0x10]
test ecx, ecx
jne 0x487c10
mov ecx, dword [esp + 0x18]
push ecx
call fcn.0050dec0
mov esi, eax
add esp, 4
test esi, esi
jne 0x487d65
lea edx, [esp + 0x1c]
push edx
push 1
push eax
push fcn.00472210
push eax
push str.UPDATE____systable__SET_versionversion1_WHERE_segno_IN_t_t_SELECT_DISTINCT_tp.tsegno_t_t_FROM____systablepriv__tp_INNER_JOIN____syscolumnpriv__cp_t_t_ON_tp.tsegnocp.tsegno_t_t_WHERE___IN__tp.grantee_tp.grantor_cp.grantee_cp.grantor__
call fcn.0050df80
mov esi, eax
add esp, 0x18
test esi, esi
jne 0x487d65
xor edi, edi
jmp 0x487ce0
mov ecx, dword [edi + 0x627570]
lea eax, [esp + 0x1c]
push eax
push 1
push 0
push fcn.00472210
push 0
push ecx
call fcn.0050df80
mov esi, eax
add esp, 0x18
test esi, esi
jne 0x487d65
add edi, 4
cmp edi, 0xc
jb 0x487ce0
mov edx, dword [esp + 0x20]
push edx
push 1
push eax
push fcn.00472210
push eax
push str.DELETE_FROM____sysuser__WHERE_username___
jmp 0x487d57
mov eax, dword [esp + 0x20]
mov ecx, dword [eax]
mov edx, dword [edi*4 + 0x626df0]
mov dword [esp + 0x24], ecx
lea ecx, [esp + 0x24]
push ecx
push 3
push 0
push fcn.00472210
lea eax, [esp + 0xdc]
push 0
mov dword [esp + 0x3c], edx
mov dword [esp + 0x40], eax
push str.UPDATE____sysuser__SET_userclass___passwd__WHERE_username_
call fcn.0050df80
mov esi, eax
add esp, 0x18
test esi, esi
je 0x487d78
push 0x7dd
push 0
call fcn.00406f10
add esp, 8
mov eax, esi
jmp 0x487d7a
xor eax, eax
mov ecx, dword [esp + 0x14c]
pop edi
pop ebx
pop esi
pop ebp
xor ecx, esp
call fcn.00586584
add esp, 0x140
ret