Function at 0x496c50
Capabilities:
Enumerate pe sections
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xe4
mov eax, dword [0x685680]
xor eax, esp
mov dword [esp + 0xe0], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, ecx
mov dword [esp + 0x34], eax
mov eax, dword [ebx + 0x228]
mov dword [esp + 0x6c], eax
mov eax, dword [ebx + 0x22c]
push esi
mov esi, edx
push edi
mov edi, dword [ebx]
mov dword [ebx + 0x228], eax
inc eax
mov dword [esp + 0x6c], esi
mov dword [esp + 0x48], 1
mov dword [ebx + 0x22c], eax
mov dword [esp + 0x24], edi
test esi, esi
je 0x497e8b
cmp byte [edi + 0x1e], 0
jne 0x497e8b
cmp dword [ebx + 0x40], 0
jne 0x497e8b
push 0
push 0
push 0
mov edx, 0x15
call fcn.004855a0
add esp, 0xc
test eax, eax
jne 0x497e8b
push 0x30
push eax
lea eax, [esp + 0x90]
push eax
call fcn.005d1b40
mov eax, dword [esp + 0x48]
add esp, 0xc
cmp byte [eax], 4
ja 0x496d14
mov edx, dword [esi + 0x18]
mov ecx, edi
call fcn.004801a0
mov eax, 0xfffe
and word [esi + 6], ax
mov dword [esi + 0x18], 0
push 0
mov edx, esi
mov ecx, ebx
call fcn.00496880
mov eax, dword [esi + 0x18]
mov ecx, dword [esi]
mov dword [esp + 0x38], eax
mov dword [esp + 0x30], eax
mov eax, dword [esi + 8]
add esp, 4
cmp dword [ebx + 0x40], 0
mov dword [esp + 0x10], eax
mov dword [esp + 0x18], ecx
jne 0x497e2f
cmp byte [edi + 0x1e], 0
jne 0x497e2f
movzx eax, word [esi + 6]
shr eax, 2
and eax, 1
mov ecx, ebx
mov dword [esp + 0x50], eax
call fcn.00494500
mov edi, eax
mov dword [esp + 0x5c], edi
test edi, edi
je 0x497e23
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x3c]
push dword [eax]
mov ecx, ebx
call fcn.00493520
add esp, 4
test eax, eax
jne 0x497e23
xor edx, edx
mov dword [esp + 0xc], edx
cmp dword [esi + 0x1c], edx
jne 0x496faf
mov ecx, dword [esp + 0x10]
movsx eax, word [ecx]
cmp edx, eax
jge 0x496faf
mov eax, edx
shl eax, 6
mov dword [esp + 0x1c], eax
mov edi, dword [eax + ecx + 0x18]
mov dword [esp + 0x14], edi
test edi, edi
mov edi, dword [esp + 0x5c]
je 0x496fa0
mov edx, dword [eax + ecx + 0x1c]
test edx, edx
je 0x496ded
push edx
push dword [eax + ecx + 0x20]
mov edx, 2
mov ecx, edi
call fcn.00471990
mov ecx, dword [esp + 0x18]
add esp, 8
jmp 0x496f9c
mov ecx, esi
call fcn.0047f3a0
add dword [ebx + 0x21c], eax
mov eax, dword [esp + 0x14]
mov edx, esi
movzx eax, word [eax + 6]
shr eax, 2
and eax, 1
push eax
push dword [esp + 0x54]
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x14]
push eax
mov ecx, ebx
call fcn.00495bc0
add esp, 0xc
test eax, eax
je 0x496e46
cmp dword [esp + 0x30], 0
je 0x496e3a
or word [esi + 6], 4
mov dword [esp + 0x50], 1
or eax, 0xffffffff
mov dword [esp + 0xc], eax
jmp 0x496f66
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x10]
xor eax, eax
mov dword [esp + 0x44], eax
mov eax, dword [ebx + 0x48]
inc eax
mov dword [ebx + 0x48], eax
mov dword [ecx + edx + 0x20], eax
push eax
push 0
mov edx, 7
mov ecx, edi
call fcn.00471990
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x18]
mov dword [esp + 0x68], eax
inc eax
add esp, 8
cmp byte [ecx + edx + 0x26], 0
mov dword [ecx + edx + 0x1c], eax
jne 0x496eb3
cmp dword [ebx + 0x1ac], 0
jne 0x496eb3
inc dword [ebx + 0x48]
push dword [ebx + 0x48]
mov edx, 0x1a
mov ecx, edi
call fcn.00471970
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x14]
add esp, 4
mov dword [esp + 0x44], eax
push dword [ecx + edx + 0x28]
mov edx, 9
lea ecx, [esp + 0xe0]
call fcn.00492d20
mov al, byte [ebx + 0x22c]
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x14]
add esp, 4
mov byte [ecx + edx + 0x27], al
mov edx, dword [esp + 0x14]
lea eax, [esp + 0xdc]
push eax
mov ecx, ebx
call fcn.00496c50
fnstcw word [esp + 0x2c]
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x14]
fld qword [eax + 0x48]
movzx eax, word [esp + 0x2c]
or eax, 0xc00
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0x20]
add esp, 4
fldcw word [esp + 0x30]
mov eax, dword [eax + edx + 0x14]
fistp qword [esp + 0x78]
mov ecx, dword [esp + 0x78]
mov dword [eax + 0x18], ecx
mov eax, dword [esp + 0x44]
fldcw word [esp + 0x28]
test eax, eax
je 0x496f3c
mov edx, eax
mov ecx, edi
call fcn.00471d80
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x10]
mov edx, 3
push dword [eax + ecx + 0x20]
mov ecx, edi
call fcn.00471970
mov edx, dword [esp + 0x64]
add esp, 4
mov ecx, edi
push eax
call fcn.00471d00
add esp, 4
mov eax, dword [esp + 0x24]
cmp byte [eax + 0x1e], 0
jne 0x497e23
mov ecx, esi
call fcn.0047f3a0
sub dword [ebx + 0x21c], eax
mov eax, dword [esp + 0x3c]
mov ecx, dword [esi + 8]
cmp byte [eax], 4
mov dword [esp + 0x10], ecx
jbe 0x496f9c
mov eax, dword [esi + 0x18]
mov dword [esp + 0x34], eax
mov dword [esp + 0x2c], eax
mov edx, dword [esp + 0xc]
inc edx
cmp dword [esi + 0x1c], 0
mov dword [esp + 0xc], edx
je 0x496da0
mov eax, dword [esi]
movzx ecx, word [esi + 6]
mov edx, dword [esi + 0x14]
mov dword [esp + 0x18], eax
mov eax, dword [esi + 0xc]
mov dword [esp + 0x54], eax
mov eax, dword [esi + 0x10]
and ecx, 1
cmp dword [esi + 0x1c], 0
mov dword [esp + 0xc], eax
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], edx
mov dword [esp + 0x68], ecx
je 0x497051
cmp dword [esi + 0x24], 0
jne 0x497022
xor edx, edx
xor ecx, ecx
mov eax, esi
jmp 0x496ff0
mov dword [eax + 0x20], edx
mov dword [eax + 0x24], esi
mov edx, eax
mov eax, dword [eax + 0x1c]
inc ecx
test eax, eax
jne 0x496ff0
mov edi, dword [esp + 0x24]
mov eax, dword [edi + 0x58]
test eax, eax
je 0x497022
cmp ecx, eax
jle 0x497022
push str.too_many_terms_in_compound_SELECT
push ebx
call fcn.0045d420
add esp, 8
jmp 0x497e27
push dword [esp + 0x3c]
mov edx, esi
mov ecx, ebx
call fcn.00494710
mov edx, dword [esp + 0x78]
add esp, 4
mov dword [ebx + 0x228], edx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0xe0]
xor ecx, esp
call fcn.005cd355
mov esp, ebp
pop ebp
ret
mov edx, dword [esp + 0x34]
mov ecx, eax
call fcn.00482da0
mov ecx, dword [esp + 0x34]
test eax, eax
jne 0x49707c
mov eax, dword [esp + 0x24]
test byte [eax + 0xc], 0x20
mov eax, 0
cmove ecx, eax
mov dword [esp + 0x34], ecx
mov dword [esp + 0x2c], ecx
mov al, byte [esi + 6]
and al, 5
cmp al, 1
jne 0x49717a
mov edx, dword [esi]
call fcn.00482da0
test eax, eax
jne 0x49717a
mov edx, dword [esi]
mov ecx, dword [esp + 0x24]
mov eax, 0xfffe
and word [esi + 6], ax
push 0
call fcn.0047fc30
add esp, 4
mov dword [esp + 0xc], eax
mov dword [esi + 0x10], eax
mov dword [esp + 0x40], eax
xor eax, eax
mov dword [esp + 0x34], eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x14], 0xffffffff
mov ecx, dword [esp + 0x3c]
cmp byte [ecx], 9
jne 0x4970ef
mov eax, dword [esp + 0x18]
mov edx, 0x2a
push dword [eax]
push dword [ecx + 4]
mov ecx, edi
call fcn.00471990
add esp, 8
mov ecx, edi
call fcn.00471a80
movsd xmm0, qword [0x658710]
push eax
mov edx, esi
mov ecx, ebx
mov dword [esp + 0x7c], eax
movsd qword [esi + 0x48], xmm0
call fcn.00494530
add esp, 4
cmp dword [esi + 0x30], 0
jne 0x497133
mov eax, dword [esp + 0x14]
test eax, eax
js 0x497133
mov edx, eax
mov ecx, edi
call fcn.004720e0
mov byte [eax], 0x2b
or word [esi + 6], 0x40
test byte [esi + 6], 1
je 0x4971c7
mov eax, dword [ebx + 0x44]
mov dword [esp + 0x64], eax
inc eax
mov dword [ebx + 0x44], eax
mov edx, dword [esi]
mov ecx, ebx
call fcn.00493900
push 0xfffffffffffffff0
push eax
push 0
push 0
push dword [esp + 0x74]
mov edx, 0x2a
mov ecx, edi
call fcn.004719b0
add esp, 0x14
mov dl, 0x10
mov ecx, edi
mov dword [esp + 0x20], eax
call fcn.00471d60
jmp 0x4971d7
mov eax, dword [esp + 0x34]
test eax, eax
je 0x4970c6
mov edx, eax
mov ecx, ebx
call fcn.00493900
mov edx, dword [esp + 0x34]
mov ecx, eax
mov eax, dword [ebx + 0x44]
mov dword [edx + 8], eax
inc dword [ebx + 0x44]
mov eax, dword [edx]
push 0xfffffffffffffff0
push ecx
push 0
add eax, 2
push eax
push dword [edx + 8]
mov edx, 0x2a
mov ecx, edi
call fcn.004719b0
add esp, 0x14
mov dword [esp + 0x14], eax
mov dword [esi + 0x40], eax
jmp 0x4970ce
mov dword [esp + 0x20], 0xffffffff
mov dword [esp + 0x64], 0xffffffff
cmp dword [esp + 0x50], 0
mov edx, dword [esp + 0xc]
jne 0x497414
test edx, edx
jne 0x497414
cmp dword [esp + 0x68], edx
je 0x4971f8
mov eax, dword [esi]
jmp 0x4971fa
xor eax, eax
mov edx, dword [esp + 0x10]
push 0
push eax
lea eax, [esp + 0x34]
push eax
push dword [esp + 0x60]
mov ecx, ebx
call fcn.0049fa50
add esp, 0x10
mov dword [esp + 0x1c], eax
test eax, eax
je 0x497e23
movsd xmm1, qword [eax + 0x30]
movsd xmm0, qword [esi + 0x48]
comisd xmm0, xmm1
jbe 0x497235
movsd qword [esi + 0x48], xmm1
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x34], eax
test edx, edx
js 0x497257
test eax, eax
jne 0x497257
mov ecx, edi
call fcn.00471f30
mov dword [esi + 0x40], 0xffffffff
mov eax, dword [esp + 0x1c]
mov cl, byte [eax + 8]
mov byte [esp + 0x28], cl
test cl, cl
je 0x4973e0
mov edx, dword [esp + 0x20]
mov ecx, edi
call fcn.004720e0
cmp byte [esp + 0x28], 2
mov edx, eax
mov dword [esp + 0x64], 0xffffffff
jne 0x4973d9
inc dword [ebx + 0x48]
mov eax, dword [ebx + 0x48]
mov dword [esp + 0xc], eax
lea ecx, [eax + 1]
mov eax, dword [esp + 0x18]
push 1
mov eax, dword [eax]
push ecx
lea esi, [eax + ecx]
mov dword [esp + 0x40], esi
mov esi, dword [esp + 0x14]
mov ecx, ebx
lea eax, [esi + eax*2]
mov dword [ebx + 0x48], eax
mov eax, esi
mov esi, dword [esp + 0x20]
mov byte [edx], 7
mov dword [edx + 4], 1
mov dword [edx + 8], eax
mov edx, esi
call fcn.00482550
mov ecx, edi
call fcn.00416e00
mov ecx, dword [esi]
add ecx, 3
add eax, ecx
mov dword [esp + 0x38], eax
dec eax
push eax
push dword [esp + 0x18]
mov edx, 0x1b
mov ecx, edi
call fcn.00471990
add esp, 0x10
cmp dword [esi], 0
mov esi, dword [esp + 0x6c]
mov dword [esp + 0x44], 0
jle 0x497391
mov edx, dword [esp + 0xc]
mov ecx, dword [esp + 0x38]
inc edx
xor eax, eax
sub ecx, edx
mov dword [esp + 0x14], edx
mov dword [esp + 0x20], eax
mov dword [esp + 0x48], ecx
mov ecx, dword [esp + 0x18]
mov edx, dword [ecx + 0xc]
mov ecx, ebx
mov edx, dword [eax + edx]
call fcn.0047f050
mov ecx, dword [esp + 0x14]
mov esi, eax
mov eax, dword [esp + 0x48]
add eax, ecx
push eax
push dword [esp + 0x34]
mov edx, 0x4b
push ecx
mov ecx, edi
call fcn.004718f0
add esp, 0xc
or edx, 0xffffffff
push 0xfffffffffffffffc
push esi
mov ecx, edi
call fcn.00471f70
add esp, 8
mov dl, 0x80
mov ecx, edi
call fcn.00471d60
mov ecx, dword [esp + 0x44]
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x18]
inc dword [esp + 0x14]
inc ecx
add eax, 0x14
mov dword [esp + 0x44], ecx
mov dword [esp + 0x20], eax
cmp ecx, dword [edx]
jl 0x497322
mov esi, dword [esp + 0x6c]
mov eax, dword [esp + 0x1c]
mov edx, 1
push dword [eax + 0x14]
mov ecx, edi
push 0
call fcn.00471990
push dword [esp + 0x14]
mov edx, 7
push 0
mov ecx, edi
call fcn.00471990
mov eax, dword [esp + 0x28]
mov edx, 0xd
push dword [eax]
mov eax, dword [esp + 0x20]
push dword [esp + 0x4c]
inc eax
push eax
mov ecx, edi
call fcn.004718f0
add esp, 0x1c
jmp 0x4973dc
mov byte [edx], 0x95
mov eax, dword [esp + 0x1c]
push dword [eax + 0x18]
mov edx, esi
push dword [eax + 0x14]
mov ecx, ebx
push dword [esp + 0x44]
push dword [esp + 0x70]
push dword [esp + 0x44]
push 0
push 0
push dword [esp + 0x34]
call fcn.00493560
mov ecx, dword [esp + 0x3c]
add esp, 0x20
call fcn.004a0440
jmp 0x497dd3
mov dword [esp + 0x2c], 0
mov dword [esp + 0x4c], 0
test edx, edx
je 0x49747a
mov eax, dword [esi]
mov ecx, dword [eax]
mov eax, dword [eax + 0xc]
test ecx, ecx
jle 0x497447
add eax, 0x10
xor edi, edi
dec ecx
mov word [eax], di
lea eax, [eax + 0x14]
test ecx, ecx
jg 0x497436
mov edi, dword [esp + 0x5c]
mov eax, dword [edx]
mov ecx, dword [edx + 0xc]
test eax, eax
jle 0x497460
add ecx, 0x10
xor edx, edx
dec eax
mov word [ecx], dx
lea ecx, [ecx + 0x14]
test eax, eax
jg 0x497453
movsd xmm0, qword [esi + 0x48]
movsd xmm1, qword [0x658678]
comisd xmm0, xmm1
jbe 0x497487
movsd qword [esi + 0x48], xmm1
jmp 0x497487
movsd xmm0, qword [0x658608]
movsd qword [esi + 0x48], xmm0
mov ecx, edi
call fcn.00471a80
push 0x24
mov dword [esp + 0x20], eax
lea eax, [esp + 0xbc]
push 0
push eax
call fcn.005d1b40
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x18]
mov dword [esp + 0xc8], eax
add esp, 0xc
lea eax, [esp + 0x88]
mov dword [esp + 0xb8], ebx
mov dword [esp + 0xd4], eax
test ecx, ecx
je 0x4974da
mov eax, dword [ecx]
inc eax
mov dword [esp + 0x98], eax
jmp 0x4974e5
mov dword [esp + 0x98], 0
mov edx, dword [esp + 0x18]
mov dword [esp + 0x94], ecx
lea ecx, [esp + 0xb8]
call fcn.00483150
mov edx, dword [esp + 0x34]
lea ecx, [esp + 0xb8]
call fcn.00483150
mov eax, dword [esp + 0x44]
test eax, eax
je 0x497522
mov edx, eax
lea ecx, [esp + 0xb8]
call fcn.00483110
cmp dword [esp + 0xb0], 0
mov eax, dword [esp + 0xa0]
mov dword [esp + 0xa8], eax
jle 0x49756e
xor esi, esi
xor edi, edi
mov edi, edi
mov eax, dword [esp + 0xac]
lea ecx, [esp + 0xb8]
mov edx, dword [eax + esi]
mov edx, dword [edx + 0x10]
call fcn.00483150
inc edi
lea esi, [esi + 0x10]
cmp edi, dword [esp + 0xb0]
jl 0x497540
mov esi, dword [esp + 0x6c]
mov edi, dword [esp + 0x5c]
mov eax, dword [esp + 0x24]
cmp byte [eax + 0x1e], 0
jne 0x497e23
mov ecx, dword [esp + 0xc]
test ecx, ecx
je 0x497b49
mov eax, dword [ebx + 0x44]
mov dword [esp + 0x8c], eax
inc eax
mov edx, ecx
mov ecx, ebx
mov dword [ebx + 0x44], eax
call fcn.00493900
push 0xfffffffffffffff0
push eax
push 0
push dword [esp + 0xa4]
mov edx, 0x2b
push dword [esp + 0x9c]
mov ecx, edi
mov dword [esp + 0x94], eax
call fcn.004719b0
inc dword [ebx + 0x48]
mov dword [esp + 0x98], eax
mov eax, dword [ebx + 0x48]
mov dword [esp + 0x6c], eax
inc eax
mov dword [esp + 0x3c], eax
inc eax
add esp, 0x14
mov ecx, edi
mov dword [ebx + 0x48], eax
call fcn.00471a80
inc dword [ebx + 0x48]
mov dword [esp + 0x70], eax
mov eax, dword [ebx + 0x48]
mov ecx, edi
mov dword [esp + 0x20], eax
call fcn.00471a80
mov ecx, dword [ebx + 0x48]
mov edx, dword [esp + 0xc]
push dword [esp + 0x28]
mov dword [esp + 0x3c], eax
lea eax, [ecx + 1]
add ecx, dword [edx]
mov dword [esp + 0x64], eax
mov dword [ebx + 0x48], ecx
lea eax, [ecx + 1]
mov dword [esp + 0x18], eax
mov eax, dword [edx]
add eax, ecx
push 0
mov edx, 7
mov ecx, edi
mov dword [ebx + 0x48], eax
call fcn.00471990
push dword [esp + 0x60]
mov edx, 7
push 0
mov ecx, edi
call fcn.00471990
push dword [esp + 0x48]
mov edx, 2
push dword [esp + 0x34]
mov ecx, edi
call fcn.00471990
mov edx, dword [esp + 0x28]
push 0
push 0
lea eax, [esp + 0x60]
push eax
push dword [esp + 0x78]
mov ecx, ebx
call fcn.0049fa50
add esp, 0x28
mov dword [esp + 0x30], eax
test eax, eax
je 0x497e23
mov eax, dword [esp + 0x40]
mov dword [esp + 0x50], eax
test eax, eax
jne 0x4976a0
mov eax, dword [esi + 0x10]
mov dword [esp + 0x50], eax
xor eax, eax
mov dword [esp + 0xc], eax
jmp 0x497889
cmp dword [esp + 0x68], 0
je 0x4976b2
test byte [esi + 6], 1
mov edx, str.DISTINCT
je 0x4976b7
mov edx, str.GROUP_BY
mov ecx, ebx
call fcn.004939d0
mov esi, dword [esp + 0x40]
mov edx, dword [esp + 0xa0]
mov eax, dword [esi]
mov dword [esp + 0x48], eax
lea ecx, [eax + 1]
mov eax, ecx
mov dword [esp + 0xc], 1
mov dword [esp + 0x68], ecx
mov dword [esp + 0x2c], eax
test edx, edx
jle 0x497705
mov eax, dword [esp + 0x9c]
add eax, 0xc
cmp dword [eax], ecx
jl 0x4976fb
inc dword [esp + 0x2c]
inc ecx
add eax, 0x18
dec edx
jne 0x4976f2
mov eax, dword [esp + 0x2c]
mov edx, eax
mov ecx, ebx
call fcn.004831f0
mov ecx, ebx
mov dword [esp + 0x40], eax
call fcn.00481420
push 0
push dword [esp + 0x44]
mov edx, esi
mov ecx, ebx
call fcn.00482550
mov esi, dword [esp + 0x48]
mov eax, dword [esp + 0x50]
add eax, esi
push eax
push dword [esp + 0x98]
mov edx, 0x37
mov ecx, edi
call fcn.00471990
add esp, 0x10
cmp dword [esp + 0xa0], 0
mov dword [esp + 0x4c], 0
jle 0x4977d5
mov ecx, dword [esp + 0x68]
lea eax, [esi + ecx]
mov dword [esp + 0x54], eax
xor esi, esi
lea esp, [esp]
mov edx, dword [esp + 0x9c]
cmp dword [edx + esi + 0xc], ecx
jl 0x4977c0
push eax
push dword [edx + esi + 4]
mov ecx, ebx
push dword [edx + esi + 8]
mov edx, dword [edx + esi]
call fcn.004813a0
mov ecx, eax
mov eax, dword [esp + 0x60]
add esp, 0xc
cmp eax, ecx
je 0x4977b2
push eax
push ecx
mov edx, 0xf
mov ecx, edi
call fcn.00471990
mov eax, dword [esp + 0x5c]
add esp, 8
mov ecx, dword [esp + 0x68]
inc ecx
inc eax
mov dword [esp + 0x68], ecx
mov dword [esp + 0x54], eax
mov edx, dword [esp + 0x4c]
inc edx
add esi, 0x18
mov dword [esp + 0x4c], edx
cmp edx, dword [esp + 0xa0]
jl 0x497770
mov ecx, ebx
call fcn.00483190
mov esi, eax
push esi
push dword [esp + 0x30]
mov edx, 0x1f
push dword [esp + 0x48]
mov ecx, edi
call fcn.004718f0
add esp, 0xc
mov edx, 0x60
push esi
push dword [esp + 0x90]
mov ecx, edi
call fcn.00471990
mov edx, esi
mov ecx, ebx
call fcn.004831b0
mov esi, dword [esp + 0x34]
mov edx, dword [esp + 0x48]
push esi
mov ecx, ebx
call fcn.00483220
mov ecx, dword [esp + 0x3c]
add esp, 0xc
call fcn.004a0440
mov edx, dword [ebx + 0x44]
mov ecx, ebx
lea eax, [edx + 1]
mov dword [esp + 0x2c], edx
mov dword [esp + 0x90], edx
mov dword [ebx + 0x44], eax
call fcn.00483190
push esi
push eax
push edx
mov edx, 0x2c
mov ecx, edi
mov dword [esp + 0x58], eax
call fcn.004718f0
add esp, 0xc
mov edx, 0x46
push dword [esp + 0x1c]
mov ecx, edi
push dword [esp + 0x90]
call fcn.00471990
add esp, 8
mov ecx, ebx
mov byte [esp + 0x89], 1
call fcn.00481420
mov ecx, edi
call fcn.00416e00
mov ecx, ebx
mov dword [esp + 0x48], eax
call fcn.00481420
mov eax, dword [esp + 0xc]
test eax, eax
je 0x4978c1
push dword [esp + 0x4c]
mov edx, 0x3e
push dword [esp + 0x90]
mov ecx, edi
call fcn.00471990
mov eax, dword [esp + 0x14]
add esp, 8
mov ecx, dword [esp + 0x50]
xor esi, esi
cmp dword [ecx], esi
jle 0x497929
jmp 0x4978d0
test eax, eax
mov eax, dword [esp + 0x14]
je 0x4978fe
add eax, esi
push eax
push esi
push dword [esp + 0x34]
mov edx, 0x1d
mov ecx, edi
call fcn.004718f0
add esp, 0xc
test esi, esi
jne 0x49791c
mov dl, 0x20
mov ecx, edi
call fcn.00471d60
jmp 0x49791c
add eax, esi
mov byte [esp + 0x88], 1
mov edx, dword [ecx + 0xc]
push eax
lea eax, [esi + esi*4]
mov ecx, ebx
mov edx, dword [edx + eax*4]
call fcn.00482280
add esp, 4
mov ecx, dword [esp + 0x50]
mov eax, dword [esp + 0xc]
inc esi
cmp esi, dword [ecx]
jl 0x4978d0
push 0xfffffffffffffffa
push dword [esp + 0x84]
mov edx, 0x18
push dword [ecx]
mov ecx, edi
push dword [esp + 0x20]
push dword [esp + 0x70]
call fcn.004719b0
add esp, 0x14
mov ecx, edi
call fcn.00416e00
mov esi, eax
mov edx, 0x19
lea eax, [esi + 1]
push eax
push 0
push eax
call fcn.004718f0
mov eax, dword [esp + 0x5c]
mov edx, dword [esp + 0x20]
add esp, 0xc
push dword [eax]
mov ecx, ebx
push dword [esp + 0x64]
call fcn.00481460
mov eax, dword [esp + 0x30]
push dword [esp + 0x78]
inc eax
push eax
mov edx, 2
mov ecx, edi
call fcn.00471990
push dword [esp + 0x2c]
mov edx, 0x78
push dword [esp + 0x3c]
mov ecx, edi
call fcn.00471990
push dword [esp + 0x50]
mov edx, 2
push dword [esp + 0x3c]
mov ecx, edi
call fcn.00471990
mov edx, esi
mov ecx, edi
call fcn.00471d80
lea edx, [esp + 0xa8]
mov ecx, ebx
call fcn.00496a20
push dword [esp + 0x78]
mov edx, 7
push 1
mov ecx, edi
call fcn.00471990
mov eax, dword [esp + 0x34]
add esp, 0x28
test eax, eax
je 0x497a0b
push dword [esp + 0x48]
mov edx, 0x51
push dword [esp + 0x90]
mov ecx, edi
call fcn.00471990
add esp, 8
jmp 0x497a22
mov ecx, dword [esp + 0x30]
call fcn.004a0440
mov edx, dword [esp + 0x84]
mov ecx, edi
call fcn.00471f30
mov esi, dword [esp + 0x28]
push dword [esp + 0x70]
lea eax, [esi + 1]
push eax
mov edx, 2
mov ecx, edi
call fcn.00471990
push dword [esp + 0x24]
mov edx, 1
push 0
mov ecx, edi
call fcn.00471990
mov ecx, edi
call fcn.00416e00
push esi
mov esi, dword [esp + 0x70]
push 1
mov edx, 7
mov ecx, esi
mov edi, eax
call fcn.00471990
mov eax, dword [esp + 0x40]
inc eax
push eax
mov edx, 3
mov ecx, esi
call fcn.00471970
mov edx, dword [esp + 0x8c]
add esp, 0x1c
mov ecx, esi
call fcn.00471ae0
call fcn.00416e00
mov esi, eax
mov edx, 0x78
lea eax, [esi + 2]
push eax
push dword [esp + 0x5c]
call fcn.00471990
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x64]
inc eax
push eax
mov edx, 3
call fcn.00471970
add esp, 0xc
lea edx, [esp + 0x88]
mov ecx, ebx
call fcn.004969c0
mov edx, dword [esp + 0x44]
inc esi
push 8
push esi
mov ecx, ebx
call fcn.004829b0
push edi
push esi
push dword [esp + 0x4c]
mov esi, dword [esp + 0x80]
push dword [esp + 0x78]
mov edx, esi
push dword [esp + 0x4c]
mov ecx, ebx
push 0
push 0
push dword [esi]
call fcn.00493560
mov eax, dword [esp + 0x50]
mov edi, dword [esp + 0x84]
inc eax
push eax
mov edx, 3
mov ecx, edi
call fcn.00471970
mov edx, dword [esp + 0x64]
add esp, 0x2c
mov ecx, edi
call fcn.00471ae0
lea edx, [esp + 0x88]
mov ecx, ebx
call fcn.004968e0
push dword [esp + 0x20]
mov edx, 3
mov ecx, edi
call fcn.00471970
add esp, 4
jmp 0x497dc8
lea edx, [esp + 0x88]
mov ecx, esi
mov dword [esp + 0x58], 0
call fcn.00496160
mov dword [esp + 0x14], eax
test eax, eax
je 0x497c8e
mov edx, dword [eax + 0x44]
mov ecx, dword [ebx]
call fcn.00492750
mov edx, dword [esp + 0x14]
mov ecx, eax
mov eax, dword [ebx + 0x44]
mov dword [esp + 0x20], eax
inc eax
mov dword [ebx + 0x44], eax
xor eax, eax
mov dword [esp + 0x4c], eax
mov dword [esp + 0x38], eax
mov eax, dword [edx + 0x14]
mov dword [esp + 0x30], ecx
mov edx, ecx
mov ecx, ebx
mov dword [esp + 0x60], eax
call fcn.00489110
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0x30]
push dword [eax]
mov ecx, ebx
push 0
push dword [eax + 0x14]
call fcn.00485690
mov edx, dword [esp + 0x20]
add esp, 0xc
mov ecx, dword [edx + 0x10]
test ecx, ecx
je 0x497c17
xor esi, esi
lea ebx, [ebx]
cmp byte [ecx + 0x1a], 0
jne 0x497be4
test esi, esi
je 0x497be2
mov eax, dword [ecx + 4]
cmp eax, dword [esi + 4]
jge 0x497be4
mov esi, ecx
mov ecx, dword [ecx + 0x20]
test ecx, ecx
jne 0x497bd0
mov dword [esp + 0x38], esi
test esi, esi
mov esi, dword [esp + 0x6c]
je 0x497c17
mov ecx, dword [esp + 0x38]
mov eax, dword [ecx + 4]
cmp eax, dword [edx + 8]
jge 0x497c17
mov eax, dword [ecx + 0x14]
mov edx, ecx
mov ecx, ebx
mov dword [esp + 0x60], eax
call fcn.00489560
mov dword [esp + 0x4c], eax
push dword [esp + 0x30]
mov edx, 0x27
push dword [esp + 0x64]
mov ecx, edi
push dword [esp + 0x28]
call fcn.004718f0
mov eax, dword [esp + 0x58]
add esp, 0xc
test eax, eax
je 0x497c4a
push 0xfffffffffffffff0
push eax
or edx, 0xffffffff
mov ecx, edi
call fcn.00471f70
add esp, 8
mov eax, dword [esp + 0xac]
mov edx, 0x20
push dword [eax + 8]
mov ecx, edi
push dword [esp + 0x24]
call fcn.00471990
push dword [esp + 0x28]
mov edx, 0x2d
mov ecx, edi
call fcn.00471970
mov edx, dword [esp + 0x20]
add esp, 0xc
mov ecx, ebx
push dword [esp + 0x38]
call fcn.00496be0
add esp, 4
jmp 0x497d7f
mov ecx, esi
mov dword [esp + 0x20], 0
call fcn.004960f0
mov byte [esp + 0x28], al
test al, al
je 0x497ceb
mov eax, dword [esi]
mov ecx, dword [esp + 0x24]
mov eax, dword [eax + 0xc]
push 0
mov edx, dword [eax]
mov edx, dword [edx + 0x10]
call fcn.0047fc30
mov edx, eax
add esp, 4
mov dword [esp + 0x58], edx
mov dword [esp + 0x20], edx
test edx, edx
je 0x497ceb
mov eax, dword [esp + 0x24]
cmp byte [eax + 0x1e], 0
jne 0x497ceb
cmp byte [esp + 0x28], 1
mov eax, dword [edx + 0xc]
setne cl
mov byte [eax + 0xc], cl
mov eax, dword [edx + 0xc]
mov eax, dword [eax]
mov byte [eax], 0x98
lea edx, [esp + 0x88]
mov ecx, ebx
call fcn.004968e0
movzx eax, byte [esp + 0x28]
mov edx, dword [esp + 0x10]
push eax
push 0
lea eax, [esp + 0x28]
push eax
push dword [esp + 0x60]
mov ecx, ebx
call fcn.0049fa50
add esp, 0x10
mov dword [esp + 0x30], eax
test eax, eax
jne 0x497d34
mov edi, dword [esp + 0x24]
mov edx, dword [esp + 0x58]
mov ecx, edi
call fcn.004801a0
jmp 0x497e27
lea edx, [esp + 0x88]
mov ecx, ebx
call fcn.00496a20
cmp dword [esp + 0x20], 0
jne 0x497d68
cmp byte [esp + 0x28], 0
je 0x497d68
mov eax, dword [esp + 0x30]
mov edx, 1
push dword [eax + 0x18]
mov ecx, edi
push 0
call fcn.00471990
add esp, 8
mov ecx, dword [esp + 0x30]
call fcn.004a0440
lea edx, [esp + 0x88]
mov ecx, ebx
call fcn.004969c0
mov edx, dword [esp + 0x44]
push 8
push dword [esp + 0x20]
mov ecx, ebx
mov dword [esp + 0x3c], 0
call fcn.004829b0
mov eax, dword [esp + 0x24]
push eax
push eax
push dword [esp + 0x4c]
mov edx, esi
push 0xffffffffffffffff
push 0
push 0
push 0
push dword [esi]
mov ecx, ebx
call fcn.00493560
mov edx, dword [esp + 0x80]
mov ecx, dword [esp + 0x4c]
add esp, 0x28
call fcn.004801a0
mov edx, dword [esp + 0x1c]
mov ecx, edi
call fcn.00471ae0
cmp dword [esp + 0x64], 0
jl 0x497de6
mov edx, str.DISTINCT
mov ecx, ebx
call fcn.004939d0
cmp dword [esp + 0x34], 0
je 0x497e10
mov edx, str.ORDER_BY
mov ecx, ebx
call fcn.004939d0
push dword [esp + 0x3c]
mov eax, dword [esp + 0x1c]
mov edx, esi
push dword [eax]
mov ecx, ebx
push edi
call fcn.00493a90
add esp, 0xc
mov edx, dword [esp + 0x78]
mov ecx, edi
call fcn.00471ae0
mov dword [esp + 0x48], 0
mov edi, dword [esp + 0x24]
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x18]
mov esi, dword [esp + 0x48]
mov edx, dword [esp + 0x74]
mov dword [ebx + 0x228], edx
test esi, esi
jne 0x497e57
mov edx, dword [esp + 0x3c]
cmp byte [edx], 5
jne 0x497e57
push ecx
mov edx, eax
mov ecx, ebx
call fcn.00493ff0
add esp, 4
push dword [esp + 0x9c]
push edi
call fcn.0045b3d0
push dword [esp + 0xb4]
push edi
call fcn.0045b3d0
add esp, 0x10
mov eax, esi
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0xe0]
xor ecx, esp
call fcn.005cd355
mov esp, ebp
pop ebp
ret
mov ecx, dword [esp + 0xec]
pop edi
pop esi
pop ebx
xor ecx, esp
mov eax, 1
call fcn.005cd355
mov esp, ebp
pop ebp
ret