Function at 0x50f070
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x724
mov eax, dword [0x65ada4]
xor eax, esp
mov dword [esp + 0x720], eax
mov eax, dword [ebp + 8]
mov dword [esp + 0x10], eax
lea eax, [ebp + 0xc]
mov dword [esp + 0x28], eax
push ebx
xor eax, eax
cmp dword [ebp + 0xc], eax
push esi
push edi
mov edi, edx
setne al
mov dword [esp + 0x24], ecx
lea edx, [esp + 0x24]
lea ecx, [esp + 0x18]
push ecx
mov dword [esp + 0x34], edx
lea edx, [esp + 0x34]
push edx
inc eax
push eax
push 4
mov dword [esp + 0x30], edi
call fcn.00444330
mov ebx, eax
add esp, 0x10
test ebx, ebx
jne 0x50f40a
mov eax, dword [esp + 0x18]
test eax, eax
jne 0x50f0f0
push 4
call fcn.004432b0
mov eax, str.get_view_tree
mov esi, 0x2356
jmp 0x50f12f
cmp dword [eax + 0x10], 0
je 0x50f0fb
mov ebx, dword [eax + 0x10]
jmp 0x50f0fe
mov ebx, dword [eax + 0xc]
mov eax, ebx
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x50f103
sub eax, edx
inc eax
push eax
call dword [sym.imp.MSVCR90.dll_malloc]
mov esi, eax
add esp, 4
mov dword [esp + 0x10], esi
test esi, esi
jne 0x50f158
push 4
lea esi, [eax + 6]
call fcn.004432b0
mov eax, dword [esp + 0x20]
add esp, 4
push eax
push 0xbb9
push esi
call fcn.00406f10
add esp, 0xc
mov eax, esi
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x720]
xor ecx, esp
call fcn.00586584
mov esp, ebp
pop ebp
ret
mov edx, esi
mov eax, ebx
sub edx, ebx
mov edi, edi
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x50f160
push 4
call fcn.004432b0
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x50f430
mov ecx, dword [esp + 0x18]
cmp dword [ecx + 0x10], eax
je 0x50f1d5
mov edx, dword [0x6d3d32]
push eax
push esi
push edx
call fcn.00434480
mov ebx, eax
add esp, 0xc
test ebx, ebx
jne 0x50f400
mov ecx, dword [0x6d3d32]
mov edx, dword [ecx + 0x140]
mov eax, dword [esp + 0x1c]
push esi
mov dword [eax], edx
call dword [sym.imp.MSVCR90.dll_free]
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x720]
xor ecx, esp
call fcn.00586584
mov esp, ebp
pop ebp
ret
cmp dword [ebp + 0xc], 0
jne 0x50f27d
mov esi, dword [str.public]
mov eax, dword [esi + 0x120]
cmp eax, dword [ebp + 0x10]
jne 0x50f27d
mov ecx, 0x49
lea edi, [esp + 0x38]
rep movsd dword es:[edi], dword [esi]
push 0x2a9
lea edx, [esp + 0x164]
push 0
push edx
call sub.MSVCR90.dll_memset
mov al, byte [0x6d3d3e]
mov esi, dword [esp + 0x2c]
mov edx, dword [esp + 0x1c]
mov byte [esp + 0x174], al
mov eax, dword [0x6d3d32]
mov byte [esp + 0x173], 1
mov ecx, 0x65
lea edi, [esp + 0x177]
rep movsd dword es:[edi], dword [esi]
lea ecx, [esp + 0x16c]
push ecx
push 0
push 0
push edx
push eax
movsb byte es:[edi], byte [esi]
call fcn.005a66f0
mov edi, dword [str.public]
mov ebx, eax
mov ecx, 0x49
lea esi, [esp + 0x58]
add esp, 0x20
rep movsd dword es:[edi], dword [esi]
mov esi, dword [esp + 0x10]
test ebx, ebx
je 0x50f1a2
jmp 0x50f400
push 0x104
lea ecx, [esp + 0x415]
push 0
push ecx
mov byte [esp + 0x41c], 0
call sub.MSVCR90.dll_memset
mov ebx, dword [sym.imp.MSVCR90.dll_sprintf]
lea eax, [edi + 0x93]
add esp, 0xc
cmp byte [eax], 0
lea edx, [ebp + 0x10]
mov dword [esp + 0x2c], edx
je 0x50f2ea
push eax
lea eax, [esp + 0x414]
push str.___s_
push eax
call ebx
lea esi, [esp + eax + 0x41c]
lea eax, [edi + 0x114]
add esp, 0xc
cmp byte [eax], 0
je 0x50f2e7
push eax
push str.___s_
push esi
call ebx
add esp, 0xc
add esi, eax
mov byte [esi], 0
mov edx, dword [str.SELECT_username__userclass__passwd_FROM____sysuser__s_WHERE_userid_]
lea ecx, [esp + 0x410]
push ecx
push edx
lea eax, [esp + 0x520]
push eax
call ebx
mov esi, dword [str.public]
mov ecx, 0x49
lea edi, [esp + 0x44]
rep movsd dword es:[edi], dword [esi]
lea ecx, [esp + 0x38]
push ecx
push 1
lea edx, [esp + 0x28]
push edx
lea eax, [esp + 0x40]
push eax
push fcn.00472210
lea ecx, [esp + 0x538]
push 0
push ecx
call fcn.0050dfb0
mov ebx, eax
add esp, 0x28
test ebx, ebx
jne 0x50f3fc
cmp dword [esp + 0x14], eax
je 0x50f3da
mov eax, dword [str.public]
mov edx, dword [ebp + 0x10]
mov dword [eax + 0x120], edx
mov ecx, dword [esp + 0x14]
movzx eax, word [ecx]
cmp ax, word [ecx + 2]
jne 0x50f36f
xor eax, eax
jmp 0x50f372
cwde
add eax, ecx
mov edx, dword [str.public]
mov cl, byte [eax]
mov byte [edx], cl
inc eax
inc edx
test cl, cl
jne 0x50f378
mov eax, dword [esp + 0x14]
movzx ecx, word [eax + 2]
cmp cx, word [eax + 4]
jne 0x50f394
xor ecx, ecx
jmp 0x50f399
movsx ecx, cx
add ecx, eax
mov edx, dword [str.public]
sub edx, 0xffffff80
mov al, byte [ecx]
mov byte [edx], al
inc ecx
inc edx
test al, al
jne 0x50f3a2
mov eax, dword [esp + 0x14]
movzx ecx, word [eax + 4]
cmp cx, word [eax + 6]
jne 0x50f3be
xor ecx, ecx
jmp 0x50f3c3
movsx ecx, cx
add ecx, eax
mov edx, dword [str.public]
add edx, 0x100
nop
mov al, byte [ecx]
mov byte [edx], al
inc ecx
inc edx
test al, al
jne 0x50f3d0
mov ecx, dword [esp + 0x28]
push ecx
call fcn.0050dec0
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x50f3fc
cmp dword [esp + 0x14], eax
jne 0x50f1ff
mov ebx, 0x40d8
mov esi, dword [esp + 0x10]
push esi
call dword [sym.imp.MSVCR90.dll_free]
add esp, 4
push 0xbb9
push 0
call fcn.00406f10
mov ecx, dword [esp + 0x734]
add esp, 8
pop edi
pop esi
mov eax, ebx
pop ebx
xor ecx, esp
call fcn.00586584
mov esp, ebp
pop ebp
ret
push 4
call fcn.004432b0
add esp, 4
jmp 0x50f400