Function at 0x502310
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3c
push ebx
push esi
push edi
mov edi, edx
mov dword [ebp - 4], 0
mov ebx, ecx
mov dword [ebp - 0x10], edi
mov eax, dword [edi + 4]
mov ecx, dword [ebx]
mov esi, dword [edi + 8]
lea edx, [eax - 1]
mov dword [ebp - 0x24], edx
test eax, eax
je 0x50276d
push dword [edi]
push dword [ecx + 8]
push dword [ecx + 4]
push str.SELECT_segid__term___pgno__1____pgno1__FROM__Q._q_idx_WHERE_segid_d_ORDER_BY_1__2
call fcn.0043d5d0
push eax
lea edx, [ebp - 4]
mov ecx, ebx
call fcn.004f8740
add esp, 0x14
cmp dword [ebx + 0x24], 0
mov eax, dword [ebp - 4]
jne 0x50275b
push eax
call fcn.00466ed0
add esp, 4
cmp eax, 0x64
jne 0x502758
push 1
push dword [ebp - 4]
call fcn.004675a0
push 1
push dword [ebp - 4]
mov dword [ebp - 0x18], eax
call fcn.00467650
push 2
push dword [ebp - 4]
mov dword [ebp - 0x20], eax
call fcn.004678f0
push 3
push dword [ebp - 4]
mov dword [ebp - 0xc], eax
call fcn.004678f0
mov edx, dword [ebp - 0xc]
add esp, 0x20
mov dword [ebp - 0x2c], eax
cmp edx, dword [edi + 4]
jl 0x50235d
mov eax, dword [edi]
xor edi, edi
cdq
mov ecx, eax
mov eax, dword [ebp - 0xc]
shl ecx, 5
cdq
add edi, eax
adc ecx, edx
push ecx
push edi
mov ecx, ebx
call fcn.004f8590
add esp, 8
mov dword [ebp - 8], eax
test eax, eax
je 0x502758
mov ecx, dword [eax + 4]
cmp ecx, 4
jl 0x502748
mov edi, dword [eax + 8]
cmp edi, ecx
jg 0x502748
jl 0x502409
mov dword [ebx + 0x24], 0x10b
jmp 0x5024e0
mov ecx, dword [eax]
lea edx, [ebp - 0x14]
lea ecx, [ecx + edi]
call fcn.0050e3b0
mov eax, dword [ebp - 8]
mov edx, dword [eax]
movzx ecx, byte [edx]
movzx eax, byte [edx + 1]
shl ecx, 8
add ecx, eax
mov eax, dword [ebp - 0x14]
cmp ecx, eax
jge 0x5024cc
cmp eax, edi
jge 0x5024cc
lea ecx, [edx + eax]
lea edx, [ebp - 0x1c]
call fcn.0050e3b0
mov ecx, dword [ebp - 0x20]
mov edi, eax
add edi, dword [ebp - 0x14]
mov edx, ecx
mov eax, dword [ebp - 0x1c]
cmp eax, ecx
cmovl edx, eax
test edx, edx
je 0x5024c6
mov ecx, dword [ebp - 8]
mov ecx, dword [ecx]
add ecx, edi
mov edi, dword [ebp - 0x18]
sub edx, 4
jb 0x502481
nop word [eax + eax]
mov eax, dword [ecx]
cmp eax, dword [edi]
jne 0x502486
add ecx, 4
add edi, 4
sub edx, 4
jae 0x502470
cmp edx, 0xfffffffc
je 0x5024ba
mov al, byte [ecx]
cmp al, byte [edi]
jne 0x5024b3
cmp edx, 0xfffffffd
je 0x5024ba
mov al, byte [ecx + 1]
cmp al, byte [edi + 1]
jne 0x5024b3
cmp edx, 0xfffffffe
je 0x5024ba
mov al, byte [ecx + 2]
cmp al, byte [edi + 2]
jne 0x5024b3
cmp edx, 0xffffffff
je 0x5024ba
mov al, byte [ecx + 3]
cmp al, byte [edi + 3]
je 0x5024ba
sbb eax, eax
or eax, 1
jmp 0x5024bc
xor eax, eax
test eax, eax
jne 0x5024ca
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x20]
sub eax, ecx
test eax, eax
jns 0x5024d3
mov dword [ebx + 0x24], 0x10b
mov edx, dword [ebp - 8]
mov ecx, ebx
call fcn.00502130
mov eax, dword [ebp - 8]
push eax
call fcn.0043abf0
add esp, 4
cmp dword [ebx + 0x24], 0
jne 0x502758
mov ecx, dword [ebp - 0x24]
xor eax, eax
mov edx, dword [ebp - 0xc]
inc ecx
dec edx
mov dword [ebp - 8], ecx
mov dword [ebp - 0x24], edx
cmp ecx, edx
jg 0x5025dc
mov eax, dword [ebp - 0x10]
xor edi, edi
mov eax, dword [eax]
cdq
mov ecx, eax
mov eax, dword [ebp - 8]
shl ecx, 5
cdq
add edi, eax
adc ecx, edx
push ecx
push edi
mov ecx, ebx
call fcn.004f8590
mov edi, eax
add esp, 8
test edi, edi
je 0x5025c7
mov ecx, dword [edi + 8]
cmp ecx, dword [edi + 4]
jge 0x502545
mov dword [ebx + 0x24], 0x10b
lea eax, [esi + 1]
cmp dword [ebp - 8], eax
jl 0x50256f
mov edx, dword [edi]
mov eax, pe_nt_image_headers32
movzx ecx, byte [edx]
imul ecx, eax
movzx eax, byte [edx + 1]
add cx, ax
xor eax, eax
cmp ax, cx
je 0x50256f
mov dword [ebx + 0x24], 0x10b
cmp dword [0x535068], 0
je 0x5025bd
mov eax, dword [0x538818]
test eax, eax
je 0x50258b
push eax
call dword [0x5350b8]
add esp, 4
push edi
call dword [0x535094]
sub dword [0x538620], eax
add esp, 4
dec dword [0x538644]
push edi
call dword [0x53508c]
mov eax, dword [0x538818]
add esp, 4
test eax, eax
je 0x5025c7
push eax
call dword [0x5350c0]
jmp 0x5025c4
push edi
call dword [0x53508c]
add esp, 4
mov ecx, dword [ebp - 8]
mov eax, dword [ebx + 0x24]
inc ecx
mov edx, dword [ebp - 0x24]
mov dword [ebp - 8], ecx
test eax, eax
je 0x502503
test eax, eax
jne 0x502758
cmp dword [ebp - 0x2c], eax
je 0x502737
mov eax, dword [ebp - 0x10]
xor edx, edx
mov ecx, dword [ebp - 0xc]
xor esi, esi
push ecx
mov edi, ecx
mov ecx, ebx
mov eax, dword [eax]
push eax
mov dword [ebp - 0x2c], eax
call fcn.004fa090
add esp, 8
mov dword [ebp - 8], eax
mov edx, eax
mov ecx, ebx
call fcn.004f9c60
test eax, eax
jne 0x502721
mov eax, dword [ebp - 0x2c]
cdq
mov ecx, eax
mov dword [ebp - 0x2c], edx
mov dword [ebp - 0x18], ecx
nop word [eax + eax]
mov eax, dword [ebp - 8]
lea esi, [edi + 1]
mov eax, dword [eax + 0x18]
mov dword [ebp - 0x20], eax
cmp esi, eax
jge 0x50269d
shl ecx, 5
mov dword [ebp - 0x24], ecx
mov eax, esi
cdq
add eax, 0
adc edx, ecx
mov ecx, ebx
push edx
push eax
call fcn.004f8590
add esp, 8
mov dword [ebp - 0x2c], eax
test eax, eax
je 0x502689
mov edi, dword [eax]
mov eax, pe_nt_image_headers32
movzx edx, byte [edi]
imul edx, eax
movzx eax, byte [edi + 1]
add dx, ax
je 0x50267e
mov dword [ebx + 0x24], 0x10b
push dword [ebp - 0x2c]
call fcn.0043abf0
add esp, 4
mov eax, dword [ebp - 8]
inc esi
mov ecx, dword [ebp - 0x24]
mov eax, dword [eax + 0x18]
mov dword [ebp - 0x20], eax
cmp esi, eax
jl 0x502646
mov ecx, dword [ebp - 0x18]
shl ecx, 5
xor edi, edi
cdq
add edi, eax
adc ecx, edx
push ecx
push edi
mov ecx, ebx
call fcn.004f8590
mov edi, eax
add esp, 8
test edi, edi
je 0x5026fa
mov eax, dword [edi]
movzx edx, byte [eax]
movzx ecx, byte [eax + 1]
shl edx, 8
add edx, ecx
cmp edx, dword [edi + 8]
jge 0x5026ea
lea ecx, [eax + edx]
lea edx, [ebp - 0x38]
call fcn.0050e440
mov ecx, dword [ebp - 8]
mov eax, dword [ebp - 0x38]
cmp eax, dword [ecx + 0x20]
jne 0x5026ea
mov eax, dword [ebp - 0x34]
cmp eax, dword [ecx + 0x24]
je 0x5026f1
mov dword [ebx + 0x24], 0x10b
push edi
call fcn.0043abf0
add esp, 4
mov edx, dword [ebp - 8]
mov ecx, ebx
push 0
call fcn.004f9ad0
mov edx, dword [ebp - 8]
add esp, 4
mov ecx, ebx
call fcn.004f9c60
mov edi, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x18]
test eax, eax
je 0x502630
mov ecx, dword [ebp - 8]
call fcn.004f9fa0
mov eax, dword [ebp - 0xc]
mov edi, dword [ebp - 0x10]
mov dword [ebp - 0x24], eax
jmp 0x50235d
mov edi, dword [ebp - 0x10]
mov eax, dword [ebp - 0xc]
mov dword [ebp - 0x24], eax
mov esi, dword [edi + 8]
jmp 0x50235d
push eax
mov dword [ebx + 0x24], 0x10b
call fcn.0043abf0
add esp, 4
mov eax, dword [ebp - 4]
push eax
call fcn.00465c30
add esp, 4
cmp dword [ebx + 0x24], 0
jne 0x50276d
mov dword [ebx + 0x24], eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret