Function at 0x4c8180
Capabilities:
Reference sql statements

Disassembly:
sub esp, 0x24
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x38]
cmp dword [edi + 0x6e4], 0
mov byte [esp + 0x12], 0
mov byte [esp + 0x13], 0
mov dword [esp + 0x20], 0
lea ebx, [edi + 0x6e8]
jle 0x4c842d
mov ebp, dword [ebx + 0x147]
test ebp, ebp
je 0x4c8412
cmp byte [ebx + 0x16b], 0
jne 0x4c8412
cmp dword [ebx + 0x14b], 0xffffffff
lea edx, [ebp - 1]
setne byte [esp + 0x11]
cmp ebp, 1
setge al
test al, al
mov eax, dword [edi + 0x17a9b]
mov dword [esp + 0x18], edx
je 0x4c8393
mov edi, dword [edi + 0x17a93]
xor esi, esi
xor ecx, ecx
test edi, edi
jle 0x4c84c0
cmp dword [eax], 0x4aa
jne 0x4c827b
cmp dword [eax + 0x1e], ebp
jne 0x4c827b
cmp byte [esp + 0x11], 0
je 0x4c826d
mov edx, dword [ebx + 0x14b]
cmp dword [eax + 0x22], edx
mov edx, dword [esp + 0x18]
jne 0x4c827b
mov ecx, eax
test ecx, ecx
je 0x4c84c0
cmp byte [ecx + 0x2b], 1
jne 0x4c8528
mov al, byte [ecx + 0x2a]
cmp al, 2
je 0x4c8566
cmp al, 3
je 0x4c8566
cmp byte [esp + 0x11], 0
je 0x4c8285
mov eax, dword [ecx + 0x26]
cmp eax, dword [ebx + 0x153]
jne 0x4c85a4
mov edi, dword [esp + 0x38]
jmp 0x4c8412
test ecx, ecx
jne 0x4c848c
mov edx, dword [esp + 0x18]
mov ecx, eax
inc esi
add eax, 0x30
cmp esi, edi
jl 0x4c8204
jmp 0x4c8229
lea eax, [ecx + 0x22]
add ecx, 0x26
mov dword [esp + 0x30], ecx
lea ecx, [esp + 0x28]
push ecx
push 3
lea edx, [esp + 0x1c]
push edx
mov dword [esp + 0x38], eax
mov dword [esp + 0x34], eax
lea eax, [esp + 0x28]
push eax
push fcn.00472210
push 0
push str.SELECT_sc.surrid__sc.ctype___t_t____SELECT_cluster_FROM____systable__s_WHERE_s.segno___t__tFROM____syscolumn__sc_____syssurrogate__sr____t__tWHERE_tsegno_____AND_sc.surrid__sr.surrid___t_t__tAND_sr.level__1_AND_sr.cpos___
call fcn.0050dfb0
mov esi, eax
add esp, 0x1c
test esi, esi
jne 0x4c8646
mov eax, dword [esp + 0x14]
test eax, eax
jne 0x4c82dc
mov edi, dword [esp + 0x24]
mov byte [esp + 0x12], 1
jmp 0x4c835f
movzx ecx, word [eax]
cmp cx, word [eax + 2]
jne 0x4c82e9
xor ecx, ecx
jmp 0x4c82ee
movsx ecx, cx
add ecx, eax
mov ecx, dword [ecx]
mov dword [ebx + 0x167], ecx
movzx ecx, word [eax + 2]
cmp cx, word [eax + 4]
jne 0x4c8304
xor ecx, ecx
jmp 0x4c8309
movsx ecx, cx
add ecx, eax
lea edx, [ebx + 4]
push edx
push ecx
call fcn.00575a60
mov ecx, dword [esp + 0x1c]
mov byte [ebx + 8], 1
movzx eax, word [ecx + 4]
add esp, 8
cmp ax, word [ecx + 6]
jne 0x4c832c
xor eax, eax
jmp 0x4c832f
cwde
add eax, ecx
movsx edi, word [eax]
mov ecx, dword [esp + 0x1c]
push 0
lea eax, [esp + 0x18]
push eax
push ecx
mov dword [esp + 0x30], edi
call fcn.00490540
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x4c85e2
cmp dword [esp + 0x14], eax
je 0x4c835f
mov byte [esp + 0x13], 1
mov edx, dword [esp + 0x1c]
push edx
call fcn.0050dec0
add esp, 4
cmp byte [esp + 0x12], 0
jne 0x4c8613
cmp byte [esp + 0x13], 0
jne 0x4c8613
mov eax, dword [esp + 0x38]
cmp dword [eax + 0x5c], edi
jl 0x4c85f1
mov edi, eax
jmp 0x4c8412
xor edx, edx
xor cl, cl
cmp dword [edi + 0x17a93], edx
jle 0x4c8771
cmp dword [eax], 0x4aa
jne 0x4c83fe
mov esi, dword [eax + 0x26]
cmp esi, dword [ebx + 0x153]
jne 0x4c83fe
mov esi, dword [ebx + 0x14b]
cmp dword [eax + 0x22], esi
jne 0x4c83fe
test cl, cl
jne 0x4c86e3
mov ecx, dword [eax + 0x1e]
mov dword [ebx + 0x147], ecx
cmp byte [eax + 0x2b], 1
mov byte [esp + 0x11], 1
jne 0x4c8721
mov cl, byte [eax + 0x2a]
cmp cl, 2
je 0x4c8749
cmp cl, 3
je 0x4c8749
mov edi, dword [esp + 0x38]
mov cl, byte [esp + 0x11]
inc edx
add eax, 0x30
cmp edx, dword [edi + 0x17a93]
jl 0x4c83a3
test cl, cl
je 0x4c8771
mov eax, dword [esp + 0x20]
inc eax
add ebx, 0x16c
cmp eax, dword [edi + 0x6e4]
mov dword [esp + 0x20], eax
jl 0x4c81b0
mov ebp, dword [edi + 0x6e4]
xor eax, eax
lea ecx, [edi + 0x6e8]
mov esi, ecx
test ebp, ebp
jle 0x4c8482
mov ebx, dword [esi + 0x147]
test ebx, ebx
jle 0x4c8477
xor ecx, ecx
lea edx, [edi + 0x6e8]
test eax, eax
jle 0x4c8477
jmp 0x4c8460
cmp dword [edx + 0x147], ebx
je 0x4c87ab
inc ecx
add edx, 0x16c
cmp ecx, eax
jl 0x4c8460
inc eax
add esi, 0x16c
cmp eax, ebp
jl 0x4c8441
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x24
ret
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x38]
imul eax, eax, 0x16c
mov eax, dword [eax + edx + 0x6e8]
push eax
push eax
mov eax, dword [ebx]
push eax
push 0xbb9
push 0x23df
call fcn.00406f10
add esp, 0x14
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret
imul edx, edx, 0x16c
cmp byte [esp + 0x11], 0
je 0x4c84fe
mov ecx, dword [esp + 0x38]
mov edx, dword [edx + ecx + 0x6e8]
mov eax, dword [ebx + 0x14f]
mov ecx, dword [ebx]
push eax
push edx
push edx
push ecx
push 0xbb9
push 0x23e1
call fcn.00406f10
add esp, 0x18
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret
mov eax, dword [esp + 0x38]
mov edx, dword [edx + eax + 0x6e8]
mov ecx, dword [ebx]
push edx
push edx
push ecx
push 0xbb9
push 0x23e0
call fcn.00406f10
add esp, 0x14
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret
cmp byte [esp + 0x11], 0
jne 0x4c8721
mov eax, dword [esp + 0x38]
imul edx, edx, 0x16c
mov edx, dword [edx + eax + 0x6e8]
lea ecx, [eax + 0x17c1a]
push ecx
push edx
push 0xbb9
push 0x23ee
call fcn.00406f10
add esp, 0x10
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret
cmp byte [esp + 0x11], 0
jne 0x4c8749
mov eax, dword [esp + 0x38]
imul edx, edx, 0x16c
mov edx, dword [edx + eax + 0x6e8]
lea ecx, [eax + 0x17c1a]
push ecx
push edx
push 0xbb9
push 0x23f4
call fcn.00406f10
add esp, 0x10
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret
mov eax, dword [esp + 0x38]
imul edx, edx, 0x16c
mov edx, dword [edx + eax + 0x6e8]
mov ecx, dword [ebx + 0x157]
mov eax, dword [ebx + 0x14f]
push ecx
mov ecx, dword [ebx]
push eax
push edx
push edx
push ecx
push 0xbb9
push 0x23e2
call fcn.00406f10
add esp, 0x1c
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret
mov edx, dword [esp + 0x1c]
push edx
call fcn.0050dec0
add esp, 4
jmp 0x4c8646
mov eax, dword [eax + 0x5c]
mov ecx, dword [ebx]
push eax
push edi
push ecx
push 0xbb9
push 0x23ef
call fcn.00406f10
add esp, 0x14
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret
mov edx, dword [esp + 0x30]
lea eax, [esp + 0x28]
push eax
push 2
lea ecx, [esp + 0x1c]
push ecx
mov dword [esp + 0x38], edx
lea edx, [esp + 0x28]
push edx
push fcn.00472210
push 0
push str.SELECT_tname_cname_FROM____systable_____syscolumn_____t_tWHERE_tsegno____AND_tsegno__segno_AND_cpos___
call fcn.0050dfb0
mov esi, eax
add esp, 0x1c
test esi, esi
je 0x4c865f
push 0xbb9
push 0
call fcn.00406f10
add esp, 8
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret
xor eax, eax
cmp byte [esp + 0x12], al
sete al
add eax, 0x23e3
mov ebp, eax
mov eax, dword [esp + 0x14]
movzx ecx, word [eax]
movzx esi, word [eax + 2]
cmp cx, si
jne 0x4c8683
xor edi, edi
jmp 0x4c8688
movsx edi, cx
add edi, eax
cmp cx, si
jne 0x4c8691
xor edx, edx
jmp 0x4c8696
movsx edx, cx
add edx, eax
cmp si, word [eax + 4]
jne 0x4c86a0
xor ecx, ecx
jmp 0x4c86a5
movsx ecx, si
add ecx, eax
mov eax, dword [esp + 0x18]
imul eax, eax, 0x16c
push edi
push edx
push ecx
mov ecx, dword [esp + 0x44]
mov edx, dword [eax + ecx + 0x6e8]
mov eax, dword [ebx]
push edx
push eax
push 0xbb9
push ebp
call fcn.00406f10
mov ecx, dword [esp + 0x38]
push ecx
call fcn.0050dec0
add esp, 0x20
pop edi
pop esi
mov eax, ebp
pop ebp
pop ebx
add esp, 0x24
ret
mov edx, dword [ebx + 0x157]
mov eax, dword [ebx + 0x14f]
mov ecx, dword [esp + 0x38]
push edx
mov edx, dword [ebx + 0x15b]
push eax
add ecx, 0x17c1a
push ecx
push eax
mov eax, dword [ebx]
push edx
push eax
push 0xbb9
push 0x23e5
call fcn.00406f10
add esp, 0x20
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret
mov ecx, dword [ebx + 0x14f]
mov edx, dword [ebx + 0x157]
push ecx
push edx
push 0xbb9
push 0x23ed
call fcn.00406f10
add esp, 0x10
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret
mov eax, dword [ebx + 0x14f]
mov ecx, dword [ebx + 0x157]
push eax
push ecx
push 0xbb9
push 0x23f3
call fcn.00406f10
add esp, 0x10
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret
mov eax, dword [ebx + 0x14f]
mov edx, dword [ebx + 0x157]
mov ecx, dword [ebx]
push edx
push eax
add edi, 0x17c1a
push edi
push eax
mov eax, dword [ebx + 0x15b]
push eax
push ecx
push 0xbb9
push 0x23e6
call fcn.00406f10
add esp, 0x20
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret
mov edx, dword [edx]
mov eax, ebx
imul eax, eax, 0x16c
mov ecx, dword [eax + edi + 0x57c]
mov eax, dword [esi]
push ecx
push edx
push eax
add edi, 0x17c1a
push edi
push 0xbb9
push 0x23f5
call fcn.00406f10
add esp, 0x18
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret