Function at 0x42755b
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xb28
push edi
mov dword [ebp - 0x114], 0
mov dword [ebp - 0xb28], 0
mov dword [ebp - 4], 0
mov ax, word [0x449884]
mov word [ebp - 0xb24], ax
mov ecx, 0x1ff
xor eax, eax
lea edi, [ebp - 0xb22]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov cx, word [0x44988c]
mov word [ebp - 0x21c], cx
mov ecx, 0x41
xor eax, eax
lea edi, [ebp - 0x21a]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov dx, word [0x449894]
mov word [ebp - 0x324], dx
mov ecx, 0x41
xor eax, eax
lea edi, [ebp - 0x322]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov ax, word [0x44989c]
mov word [ebp - 0x110], ax
mov ecx, 0x41
xor eax, eax
lea edi, [ebp - 0x10e]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov dword [ebp - 8], 0
mov ecx, dword [ebp + 0xc]
push ecx
push 0x444ba8
call fcn.0042fc9e
add esp, 8
cmp dword [ebp + 8], 0
je 0x42761e
cmp dword [ebp + 0xc], 0
jne 0x427625
xor eax, eax
jmp 0x4278a0
push 0x5c
mov edx, dword [ebp + 0xc]
push edx
call dword [sym.imp.MSVCRT.dll_wcschr]
add esp, 8
test eax, eax
je 0x42765c
push 0x108
lea eax, [ebp - 0x110]
push eax
push 0x444bf4
push 0x444bf8
mov ecx, dword [ebp + 0xc]
push ecx
call fcn.0042f530
add esp, 0x14
jmp 0x427670
mov edx, dword [ebp + 0xc]
push edx
lea eax, [ebp - 0x110]
push eax
call dword [sym.imp.MSVCRT.dll_wcscpy]
add esp, 8
push 0x444bfc
lea ecx, [ebp - 0x110]
push ecx
push 0x444c14
lea edx, [ebp - 0x324]
push edx
mov eax, dword [0x449ba0]
call dword [eax + 0x4cc]
add esp, 0x10
lea ecx, [ebp - 0x324]
push ecx
lea edx, [ebp - 0x324]
push edx
mov eax, dword [ebp + 0xc]
push eax
push str.SELECT__SELECT_COUNT___FROM_msdb.dbo.systargetservers_WHERE__server_name__N_s_____SELECT_COUNT___FROM_msdb.dbo.sysusers_WHERE__name__N_s_____SELECT_COUNT___FROM_master.dbo.syslogins_WHERE__loginname__N_s__
lea ecx, [ebp - 0xb24]
push ecx
mov edx, dword [0x449ba0]
call dword [edx + 0x4cc]
add esp, 0x14
lea eax, [ebp - 0xb24]
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.SQLSVC.dll_QSQLExecDirect]
add esp, 8
cmp eax, 1
jne 0x42789a
lea edx, [ebp - 8]
push edx
lea eax, [ebp - 0x114]
push eax
push 4
push 0xfffffffffffffff0
push 1
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.SQLSVC.dll_QSQLBind]
add esp, 0x18
lea edx, [ebp - 8]
push edx
lea eax, [ebp - 0xb28]
push eax
push 4
push 0xfffffffffffffff0
push 2
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.SQLSVC.dll_QSQLBind]
add esp, 0x18
lea edx, [ebp - 8]
push edx
lea eax, [ebp - 4]
push eax
push 4
push 0xfffffffffffffff0
push 3
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.SQLSVC.dll_QSQLBind]
add esp, 0x18
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.SQLSVC.dll_QSQLNextRow]
add esp, 4
cmp eax, 0xffffffff
jne 0x42774b
jmp 0x427737
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.SQLSVC.dll_QSQLPurgeResults]
add esp, 4
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.SQLSVC.dll_QSQLResults]
add esp, 4
cmp eax, 1
je 0x4276e0
cmp dword [ebp - 0xb28], 0
je 0x427781
cmp dword [ebp - 4], 0
jne 0x42784c
lea edx, [ebp - 0x324]
push edx
lea eax, [ebp - 0x324]
push eax
lea ecx, [ebp - 0x324]
push ecx
lea edx, [ebp - 0x324]
push edx
push str.EXECUTE_NUSE_msdb_IF__EXISTS__SELECT__FROM_sysusers_WHERE__name__N_s____EXECUTE_sp_dropuser__name_in_db__N_s__IF__EXISTS__SELECT__FROM_master.dbo.syslogins_WHERE__loginname__N_s____EXECUTE_master.dbo.sp_droplogin__loginame__N_s
lea eax, [ebp - 0xb24]
push eax
mov ecx, dword [0x449ba0]
call dword [ecx + 0x4cc]
add esp, 0x18
lea edx, [ebp - 0xb24]
push edx
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.SQLSVC.dll_QSQLExecDirect]
add esp, 8
cmp eax, 1
jne 0x4277de
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.SQLSVC.dll_QSQLPurgeResults]
add esp, 4
push 0x84
lea edx, [ebp - 0x21c]
push edx
mov eax, dword [ebp + 0xc]
push eax
call fcn.004230c9
add esp, 0xc
lea ecx, [ebp - 0x324]
push ecx
lea edx, [ebp - 0x21c]
push edx
lea eax, [ebp - 0x324]
push eax
push str.DECLARE__ret_INT_EXECUTE__ret__master.dbo.sp_addlogin__loginame__N_s___passwd__N_s___defdb__Nmsdb_IF___ret__0__BEGIN_USE_msdb_EXECUTE_sp_adduser__loginame__N_s_END
lea ecx, [ebp - 0xb24]
push ecx
mov edx, dword [0x449ba0]
call dword [edx + 0x4cc]
add esp, 0x14
lea eax, [ebp - 0xb24]
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.SQLSVC.dll_QSQLExecDirect]
add esp, 8
cmp eax, 1
jne 0x42784c
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.SQLSVC.dll_QSQLPurgeResults]
add esp, 4
lea eax, [ebp - 0x324]
push eax
lea ecx, [ebp - 0x324]
push ecx
push str.USE_msdb_EXECUTE_sp_addrolemember__rolename__NTargetServersRole___membername__N_s
lea edx, [ebp - 0xb24]
push edx
mov eax, dword [0x449ba0]
call dword [eax + 0x4cc]
add esp, 0x10
lea ecx, [ebp - 0xb24]
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.SQLSVC.dll_QSQLExecDirect]
add esp, 8
cmp eax, 1
jne 0x42789a
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.SQLSVC.dll_QSQLPurgeResults]
add esp, 4
mov eax, dword [ebp - 0x114]
pop edi
mov esp, ebp
pop ebp
ret